Browse Source

数据库表代码生成

shanxin 5 years ago
parent
commit
f4baf0a059
27 changed files with 1331 additions and 13 deletions
  1. 105 0
      sailun-allsteel-admin-rest/src/main/java/io/platform/homepage/web/controller/rest/ConfigArticleRestController.java
  2. 105 0
      sailun-allsteel-admin-rest/src/main/java/io/platform/homepage/web/controller/rest/ConfigBrandRestController.java
  3. 105 0
      sailun-allsteel-admin-rest/src/main/java/io/platform/homepage/web/controller/rest/ConfigSignLvRestController.java
  4. 61 0
      sailun-allsteel-admin-rest/src/main/java/io/platform/homepage/web/remote/ConfigArticleServiceRemote.java
  5. 61 0
      sailun-allsteel-admin-rest/src/main/java/io/platform/homepage/web/remote/ConfigBrandServiceRemote.java
  6. 61 0
      sailun-allsteel-admin-rest/src/main/java/io/platform/homepage/web/remote/ConfigSignLvServiceRemote.java
  7. 5 2
      sailun-allsteel-app-rest/src/main/java/io/platform/base/common/utils/JwtUtils.java
  8. 26 0
      sailun-allsteel-app-rest/src/main/java/io/platform/config/JWTBean.java
  9. 8 4
      sailun-allsteel-app-rest/src/main/java/io/platform/config/aspect/LogAopAspcet.java
  10. 5 3
      sailun-allsteel-app-rest/src/main/java/io/platform/config/interceptor/AuthorizationInterceptor.java
  11. 88 0
      sailun-allsteel-bus-provider/saillun-allsteel-bus-api/src/main/java/io/platform/homepage/dto/ConfigArticleDto.java
  12. 32 0
      sailun-allsteel-bus-provider/saillun-allsteel-bus-api/src/main/java/io/platform/homepage/dto/ConfigSignLvDto.java
  13. 45 0
      sailun-allsteel-bus-provider/saillun-allsteel-bus-api/src/main/java/io/platform/homepage/service/client/api/ConfigArticleServiceClient.java
  14. 45 0
      sailun-allsteel-bus-provider/saillun-allsteel-bus-api/src/main/java/io/platform/homepage/service/client/api/ConfigSignLvServiceClient.java
  15. 6 1
      sailun-allsteel-bus-provider/saillun-allsteel-bus-api/src/main/java/io/platform/log/dto/SysFunctionLogDto.java
  16. 133 0
      sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/homepage/biz/entity/ConfigArticle.java
  17. 54 0
      sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/homepage/biz/entity/ConfigSignLv.java
  18. 14 0
      sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/homepage/biz/mapper/ConfigArticleMapper.java
  19. 14 0
      sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/homepage/biz/mapper/ConfigSignLvMapper.java
  20. 21 0
      sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/homepage/biz/service/ConfigArticleService.java
  21. 21 0
      sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/homepage/biz/service/ConfigSignLvService.java
  22. 145 0
      sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/homepage/service/client/impl/ConfigArticleServiceClientImpl.java
  23. 2 2
      sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/homepage/service/client/impl/ConfigBrandServiceClientImpl.java
  24. 145 0
      sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/homepage/service/client/impl/ConfigSignLvServiceClientImpl.java
  25. 8 1
      sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/log/biz/entity/SysFunctionLog.java
  26. 8 0
      sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/resources/mybatis/hompage/ConfigArticleMapper.xml
  27. 8 0
      sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/resources/mybatis/hompage/ConfigSignLvMapper.xml

+ 105 - 0
sailun-allsteel-admin-rest/src/main/java/io/platform/homepage/web/controller/rest/ConfigArticleRestController.java

@@ -0,0 +1,105 @@
+
+package io.platform.homepage.web.controller.rest;
+
+
+import io.platform.homepage.dto.ConfigArticleDto;
+import io.platform.homepage.web.remote.ConfigArticleServiceRemote;
+import org.springframework.web.bind.annotation.*;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import io.platform.base.common.controller.AbstractController;
+import io.platform.base.common.utils.R;
+import io.platform.base.common.validator.ValidatorUtils;
+
+import io.platform.base.common.annotation.SysLog;
+import io.platform.base.common.utils.ExecuteResult;
+
+import java.util.List;
+import java.util.Map;
+
+
+@RestController
+@RequestMapping("/appconfig/configArticle")
+public class ConfigArticleRestController extends AbstractController {
+
+    @Autowired
+	private ConfigArticleServiceRemote configArticleServiceRemote;
+	
+	/**
+	 * 所有列表
+	 */
+	@RequestMapping("/list")
+	@RequiresPermissions("appconfig:configArticle:list")
+	public R list(@RequestParam Map<String, Object> params){
+		//查询列表数据
+		return R.ok().put("list", configArticleServiceRemote.getList(params));
+	}
+
+	/**
+	 * 分页列表
+	 */
+	@RequestMapping("/page")
+	@RequiresPermissions("appconfig:configArticle:page")
+	public R page(Page page,ConfigArticleDto configArticleDto){
+		return R.ok().put("page", configArticleServiceRemote.getPage(page,configArticleDto));
+	}
+	/**
+	 * 信息
+	 */
+	@RequestMapping("/info/{id}")
+	@RequiresPermissions("appconfig:configArticle:info")
+	public R info(@PathVariable("id") Long id){
+		ConfigArticleDto configArticleDto = configArticleServiceRemote.getOne(id);
+		return R.ok().put("configArticleDto", configArticleDto);
+	}
+	
+	/**
+	 * 保存
+	 */
+	@SysLog("保存")
+	@RequestMapping("/save")
+	@RequiresPermissions("appconfig:configArticle:save")
+	public R save(@RequestBody ConfigArticleDto configArticleDto){
+        ValidatorUtils.validateEntity(configArticleDto);
+        ExecuteResult<String> result= configArticleServiceRemote.save(configArticleDto);
+        if(result.isSuccess()){
+            return R.ok(result.getSuccessMessage());
+        }else{
+            return R.error(result.getErrorMessages().get(0));
+        }
+	}
+	
+	/**
+	 * 修改
+	 */
+	@SysLog("修改")
+	@RequestMapping("/update")
+	@RequiresPermissions("appconfig:configArticle:edit")
+	public R update(@RequestBody ConfigArticleDto configArticleDto){
+        ValidatorUtils.validateEntity(configArticleDto);
+        ExecuteResult<String> result= configArticleServiceRemote.update(configArticleDto);
+        if(result.isSuccess()){
+        	return R.ok(result.getSuccessMessage());
+        }else{
+        	return R.error(result.getErrorMessages().get(0));
+        }
+	}
+	
+	/**
+	 * 删除
+	 */
+	@SysLog("删除")
+	@RequestMapping("/delete")
+	@RequiresPermissions("appconfig:configArticle:delete")
+	public R delete(@RequestBody List<Long> ids){
+        ExecuteResult<String> result= configArticleServiceRemote.deleteBatch(ids);
+        if(result.isSuccess()){
+        	return R.ok(result.getSuccessMessage());
+        }else{
+        	return R.error(result.getErrorMessages().get(0));
+        }
+	}
+
+}

+ 105 - 0
sailun-allsteel-admin-rest/src/main/java/io/platform/homepage/web/controller/rest/ConfigBrandRestController.java

@@ -0,0 +1,105 @@
+
+package io.platform.homepage.web.controller.rest;
+
+
+import io.platform.homepage.dto.ConfigBrandDto;
+import io.platform.homepage.web.remote.ConfigBrandServiceRemote;
+import org.springframework.web.bind.annotation.*;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import io.platform.base.common.controller.AbstractController;
+import io.platform.base.common.utils.R;
+import io.platform.base.common.validator.ValidatorUtils;
+
+import io.platform.base.common.annotation.SysLog;
+import io.platform.base.common.utils.ExecuteResult;
+
+import java.util.List;
+import java.util.Map;
+
+
+@RestController
+@RequestMapping("/appconfig/configBrand")
+public class ConfigBrandRestController extends AbstractController {
+
+    @Autowired
+	private ConfigBrandServiceRemote configBrandServiceRemote;
+	
+	/**
+	 * 所有列表
+	 */
+	@RequestMapping("/list")
+	@RequiresPermissions("appconfig:configBrand:list")
+	public R list(@RequestParam Map<String, Object> params){
+		//查询列表数据
+		return R.ok().put("list", configBrandServiceRemote.getList(params));
+	}
+
+	/**
+	 * 分页列表
+	 */
+	@RequestMapping("/page")
+	@RequiresPermissions("appconfig:configBrand:page")
+	public R page(Page page,ConfigBrandDto configBrandDto){
+		return R.ok().put("page", configBrandServiceRemote.getPage(page,configBrandDto));
+	}
+	/**
+	 * 信息
+	 */
+	@RequestMapping("/info/{id}")
+	@RequiresPermissions("appconfig:configBrand:info")
+	public R info(@PathVariable("id") Long id){
+		ConfigBrandDto configBrandDto = configBrandServiceRemote.getOne(id);
+		return R.ok().put("configBrandDto", configBrandDto);
+	}
+	
+	/**
+	 * 保存
+	 */
+	@SysLog("保存")
+	@RequestMapping("/save")
+	@RequiresPermissions("appconfig:configBrand:save")
+	public R save(@RequestBody ConfigBrandDto configBrandDto){
+        ValidatorUtils.validateEntity(configBrandDto);
+        ExecuteResult<String> result= configBrandServiceRemote.save(configBrandDto);
+        if(result.isSuccess()){
+            return R.ok(result.getSuccessMessage());
+        }else{
+            return R.error(result.getErrorMessages().get(0));
+        }
+	}
+	
+	/**
+	 * 修改
+	 */
+	@SysLog("修改")
+	@RequestMapping("/update")
+	@RequiresPermissions("appconfig:configBrand:edit")
+	public R update(@RequestBody ConfigBrandDto configBrandDto){
+        ValidatorUtils.validateEntity(configBrandDto);
+        ExecuteResult<String> result= configBrandServiceRemote.update(configBrandDto);
+        if(result.isSuccess()){
+        	return R.ok(result.getSuccessMessage());
+        }else{
+        	return R.error(result.getErrorMessages().get(0));
+        }
+	}
+	
+	/**
+	 * 删除
+	 */
+	@SysLog("删除")
+	@RequestMapping("/delete")
+	@RequiresPermissions("appconfig:configBrand:delete")
+	public R delete(@RequestBody List<Long> ids){
+        ExecuteResult<String> result= configBrandServiceRemote.deleteBatch(ids);
+        if(result.isSuccess()){
+        	return R.ok(result.getSuccessMessage());
+        }else{
+        	return R.error(result.getErrorMessages().get(0));
+        }
+	}
+
+}

+ 105 - 0
sailun-allsteel-admin-rest/src/main/java/io/platform/homepage/web/controller/rest/ConfigSignLvRestController.java

@@ -0,0 +1,105 @@
+
+package io.platform.homepage.web.controller.rest;
+
+
+import io.platform.homepage.dto.ConfigSignLvDto;
+import io.platform.homepage.web.remote.ConfigSignLvServiceRemote;
+import org.springframework.web.bind.annotation.*;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import io.platform.base.common.controller.AbstractController;
+import io.platform.base.common.utils.R;
+import io.platform.base.common.validator.ValidatorUtils;
+
+import io.platform.base.common.annotation.SysLog;
+import io.platform.base.common.utils.ExecuteResult;
+
+import java.util.List;
+import java.util.Map;
+
+
+@RestController
+@RequestMapping("/appconfig/configSignLv")
+public class ConfigSignLvRestController extends AbstractController {
+
+    @Autowired
+	private ConfigSignLvServiceRemote configSignLvServiceRemote;
+	
+	/**
+	 * 所有列表
+	 */
+	@RequestMapping("/list")
+	@RequiresPermissions("appconfig:configSignLv:list")
+	public R list(@RequestParam Map<String, Object> params){
+		//查询列表数据
+		return R.ok().put("list", configSignLvServiceRemote.getList(params));
+	}
+
+	/**
+	 * 分页列表
+	 */
+	@RequestMapping("/page")
+	@RequiresPermissions("appconfig:configSignLv:page")
+	public R page(Page page,ConfigSignLvDto configSignLvDto){
+		return R.ok().put("page", configSignLvServiceRemote.getPage(page,configSignLvDto));
+	}
+	/**
+	 * 信息
+	 */
+	@RequestMapping("/info/{id}")
+	@RequiresPermissions("appconfig:configSignLv:info")
+	public R info(@PathVariable("id") Long id){
+		ConfigSignLvDto configSignLvDto = configSignLvServiceRemote.getOne(id);
+		return R.ok().put("configSignLvDto", configSignLvDto);
+	}
+	
+	/**
+	 * 保存
+	 */
+	@SysLog("保存")
+	@RequestMapping("/save")
+	@RequiresPermissions("appconfig:configSignLv:save")
+	public R save(@RequestBody ConfigSignLvDto configSignLvDto){
+        ValidatorUtils.validateEntity(configSignLvDto);
+        ExecuteResult<String> result= configSignLvServiceRemote.save(configSignLvDto);
+        if(result.isSuccess()){
+            return R.ok(result.getSuccessMessage());
+        }else{
+            return R.error(result.getErrorMessages().get(0));
+        }
+	}
+	
+	/**
+	 * 修改
+	 */
+	@SysLog("修改")
+	@RequestMapping("/update")
+	@RequiresPermissions("appconfig:configSignLv:edit")
+	public R update(@RequestBody ConfigSignLvDto configSignLvDto){
+        ValidatorUtils.validateEntity(configSignLvDto);
+        ExecuteResult<String> result= configSignLvServiceRemote.update(configSignLvDto);
+        if(result.isSuccess()){
+        	return R.ok(result.getSuccessMessage());
+        }else{
+        	return R.error(result.getErrorMessages().get(0));
+        }
+	}
+	
+	/**
+	 * 删除
+	 */
+	@SysLog("删除")
+	@RequestMapping("/delete")
+	@RequiresPermissions("appconfig:configSignLv:delete")
+	public R delete(@RequestBody List<Long> ids){
+        ExecuteResult<String> result= configSignLvServiceRemote.deleteBatch(ids);
+        if(result.isSuccess()){
+        	return R.ok(result.getSuccessMessage());
+        }else{
+        	return R.error(result.getErrorMessages().get(0));
+        }
+	}
+
+}

+ 61 - 0
sailun-allsteel-admin-rest/src/main/java/io/platform/homepage/web/remote/ConfigArticleServiceRemote.java

@@ -0,0 +1,61 @@
+
+package io.platform.homepage.web.remote;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.alibaba.dubbo.config.annotation.Reference;
+import io.platform.base.common.utils.ExecuteResult;
+import io.platform.homepage.dto.ConfigArticleDto;
+import io.platform.homepage.service.client.api.ConfigArticleServiceClient;
+import org.springframework.stereotype.Service;
+import java.util.List;
+import java.util.Map;
+
+
+
+@Service("configArticleServiceRemote")
+public class ConfigArticleServiceRemote {
+
+    @Reference(check = false)
+    private ConfigArticleServiceClient configArticleServiceClient;
+    /**
+     * 根据参数获取列表  无分页
+     */
+    public List<ConfigArticleDto> getList(Map<String, Object> params){
+        return configArticleServiceClient.queryList(params);
+    }
+    /**
+     * 根据参数进行 分页查询
+     */
+    public Page<ConfigArticleDto> getPage(Page<ConfigArticleDto> page,ConfigArticleDto configArticleDto){
+        return configArticleServiceClient.getPage(page,configArticleDto);
+    }
+    /**
+     * 根据主键 获取单条数据明细
+     */
+    public ConfigArticleDto getOne(Long id){
+        ConfigArticleDto configArticleDto = configArticleServiceClient.queryObject(id);
+        return configArticleDto;
+    }
+    /**
+     * 保存 数据
+     */
+    public ExecuteResult<String> save(ConfigArticleDto configArticleDto){
+
+       return  configArticleServiceClient.save(configArticleDto);
+    }
+    /**
+     * 修改单条数据
+     */
+    public ExecuteResult<String> update(ConfigArticleDto configArticleDto){
+
+        return configArticleServiceClient.update(configArticleDto);
+    }
+    /**
+     * 批量删除
+     */
+    public ExecuteResult<String> deleteBatch(List<Long> ids){
+        return  configArticleServiceClient.deleteBatch(ids);
+    }
+
+
+
+}

+ 61 - 0
sailun-allsteel-admin-rest/src/main/java/io/platform/homepage/web/remote/ConfigBrandServiceRemote.java

@@ -0,0 +1,61 @@
+
+package io.platform.homepage.web.remote;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.alibaba.dubbo.config.annotation.Reference;
+import io.platform.base.common.utils.ExecuteResult;
+import io.platform.homepage.dto.ConfigBrandDto;
+import io.platform.homepage.service.client.api.ConfigBrandServiceClient;
+import org.springframework.stereotype.Service;
+import java.util.List;
+import java.util.Map;
+
+
+
+@Service("configBrandServiceRemote")
+public class ConfigBrandServiceRemote {
+
+    @Reference(check = false)
+    private ConfigBrandServiceClient configBrandServiceClient;
+    /**
+     * 根据参数获取列表  无分页
+     */
+    public List<ConfigBrandDto> getList(Map<String, Object> params){
+        return configBrandServiceClient.queryList(params);
+    }
+    /**
+     * 根据参数进行 分页查询
+     */
+    public Page<ConfigBrandDto> getPage(Page<ConfigBrandDto> page,ConfigBrandDto configBrandDto){
+        return configBrandServiceClient.getPage(page,configBrandDto);
+    }
+    /**
+     * 根据主键 获取单条数据明细
+     */
+    public ConfigBrandDto getOne(Long id){
+        ConfigBrandDto configBrandDto = configBrandServiceClient.queryObject(id);
+        return configBrandDto;
+    }
+    /**
+     * 保存 数据
+     */
+    public ExecuteResult<String> save(ConfigBrandDto configBrandDto){
+
+       return  configBrandServiceClient.save(configBrandDto);
+    }
+    /**
+     * 修改单条数据
+     */
+    public ExecuteResult<String> update(ConfigBrandDto configBrandDto){
+
+        return configBrandServiceClient.update(configBrandDto);
+    }
+    /**
+     * 批量删除
+     */
+    public ExecuteResult<String> deleteBatch(List<Long> ids){
+        return  configBrandServiceClient.deleteBatch(ids);
+    }
+
+
+
+}

+ 61 - 0
sailun-allsteel-admin-rest/src/main/java/io/platform/homepage/web/remote/ConfigSignLvServiceRemote.java

@@ -0,0 +1,61 @@
+
+package io.platform.homepage.web.remote;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.alibaba.dubbo.config.annotation.Reference;
+import io.platform.base.common.utils.ExecuteResult;
+import io.platform.homepage.dto.ConfigSignLvDto;
+import io.platform.homepage.service.client.api.ConfigSignLvServiceClient;
+import org.springframework.stereotype.Service;
+import java.util.List;
+import java.util.Map;
+
+
+
+@Service("configSignLvServiceRemote")
+public class ConfigSignLvServiceRemote {
+
+    @Reference(check = false)
+    private ConfigSignLvServiceClient configSignLvServiceClient;
+    /**
+     * 根据参数获取列表  无分页
+     */
+    public List<ConfigSignLvDto> getList(Map<String, Object> params){
+        return configSignLvServiceClient.queryList(params);
+    }
+    /**
+     * 根据参数进行 分页查询
+     */
+    public Page<ConfigSignLvDto> getPage(Page<ConfigSignLvDto> page,ConfigSignLvDto configSignLvDto){
+        return configSignLvServiceClient.getPage(page,configSignLvDto);
+    }
+    /**
+     * 根据主键 获取单条数据明细
+     */
+    public ConfigSignLvDto getOne(Long id){
+        ConfigSignLvDto configSignLvDto = configSignLvServiceClient.queryObject(id);
+        return configSignLvDto;
+    }
+    /**
+     * 保存 数据
+     */
+    public ExecuteResult<String> save(ConfigSignLvDto configSignLvDto){
+
+       return  configSignLvServiceClient.save(configSignLvDto);
+    }
+    /**
+     * 修改单条数据
+     */
+    public ExecuteResult<String> update(ConfigSignLvDto configSignLvDto){
+
+        return configSignLvServiceClient.update(configSignLvDto);
+    }
+    /**
+     * 批量删除
+     */
+    public ExecuteResult<String> deleteBatch(List<Long> ids){
+        return  configSignLvServiceClient.deleteBatch(ids);
+    }
+
+
+
+}

+ 5 - 2
sailun-allsteel-app-rest/src/main/java/io/platform/base/common/utils/JwtUtils.java

@@ -1,5 +1,6 @@
 package io.platform.base.common.utils;
 
+import com.alibaba.fastjson.JSONObject;
 import com.auth0.jwt.JWT;
 import com.auth0.jwt.JWTVerifier;
 import com.auth0.jwt.algorithms.Algorithm;
@@ -8,6 +9,7 @@ import io.jsonwebtoken.Claims;
 import io.jsonwebtoken.Jwts;
 import io.jsonwebtoken.SignatureAlgorithm;
 import io.platform.base.common.exception.RRException;
+import io.platform.config.JWTBean;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.boot.context.properties.ConfigurationProperties;
@@ -33,14 +35,15 @@ public class JwtUtils {
     /**
      * 生成jwt token
      */
-    public String generateToken(long userId) {
+    public String generateToken(JWTBean jwtBean) {
+        String jwtJson = JSONObject.toJSONString(jwtBean);
         Date nowDate = new Date();
         //过期时间
         Date expireDate = new Date(nowDate.getTime() + expire * 1000);
 
         return Jwts.builder()
                 .setHeaderParam("typ", "JWT")
-                .setSubject(userId+"")
+                .setSubject(jwtJson)
                 .setIssuedAt(nowDate)
                 .setExpiration(expireDate)
                 .signWith(SignatureAlgorithm.HS512, secret)

+ 26 - 0
sailun-allsteel-app-rest/src/main/java/io/platform/config/JWTBean.java

@@ -0,0 +1,26 @@
+package io.platform.config;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * TODO
+ * JWT载体封装对象
+ *
+ * @author shanxin
+ * @version 1.0
+ * @date 2020/11/2 15:16
+ */
+@Data
+public class JWTBean implements Serializable {
+
+    private static final long serialVersionUID = 5454155825314635342L;
+
+    // 用户id
+    private String userId;
+    // 门店id
+    private Long storeId;
+
+
+}

+ 8 - 4
sailun-allsteel-app-rest/src/main/java/io/platform/config/aspect/LogAopAspcet.java

@@ -8,9 +8,11 @@ import java.util.Date;
 
 import com.alibaba.dubbo.config.annotation.Reference;
 import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
 import io.jsonwebtoken.Claims;
 import io.platform.base.common.utils.IPUtils;
 import io.platform.base.common.utils.JwtUtils;
+import io.platform.config.JWTBean;
 import io.platform.config.annotation.FuncLogAnno;
 import io.platform.log.dto.SysFunctionLogDto;
 import io.platform.log.service.client.api.SysFunctionLogServiceClient;
@@ -83,16 +85,18 @@ public class LogAopAspcet {
         // 日志对象
         SysFunctionLogDto sysFunctionLogDto = new SysFunctionLogDto();
         sysFunctionLogDto.setFunctionName(operateType);
-        Long userId = null;
         String token = req.getParameter(jwtUtils.getHeader());
         if (null != token) {
             Claims claimByToken = jwtUtils.getClaimByToken(token);
-            userId = Long.parseLong(claimByToken.getSubject());
+            JWTBean jwtBean = (JWTBean) JSONObject.toJSON(claimByToken.getSubject());
+            sysFunctionLogDto.setAccountId(jwtBean.getUserId());
+            sysFunctionLogDto.setStoreId(jwtBean.getStoreId());
+            //userId = Long.parseLong(claimByToken.getSubject());
         } else {
-            userId = -1L;
+            sysFunctionLogDto.setAccountId("-1");
+            sysFunctionLogDto.setStoreId(-1L);
         }
         String ipAddr = IPUtils.getIpAddr(req);
-        sysFunctionLogDto.setAccountId(userId);
         sysFunctionLogDto.setIpAddress(ipAddr);
         //请求的参数
         Object[] args = pjp.getArgs();

+ 5 - 3
sailun-allsteel-app-rest/src/main/java/io/platform/config/interceptor/AuthorizationInterceptor.java

@@ -1,10 +1,12 @@
 package io.platform.config.interceptor;
 
 
+import com.alibaba.fastjson.JSONObject;
 import io.jsonwebtoken.Claims;
 
 import io.platform.base.common.exception.RRException;
 import io.platform.base.common.utils.JwtUtils;
+import io.platform.config.JWTBean;
 import io.platform.config.annotation.Login;
 import org.apache.commons.lang.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -58,11 +60,11 @@ public class AuthorizationInterceptor extends HandlerInterceptorAdapter {
             throw new RRException(jwtUtils.getHeader() + "失效,请重新登录", HttpStatus.UNAUTHORIZED.value());
         }
 
-
+        String jwtJson = claims.getSubject();
+        JWTBean jwtBean = (JWTBean) JSONObject.toJSON(jwtJson);
 
         //设置userId到request里,后续根据userId,获取用户信息
-        request.setAttribute(USER_KEY, Long.parseLong(claims.getSubject()));
-
+        request.setAttribute(USER_KEY, jwtBean);
         return true;
     }
 }

+ 88 - 0
sailun-allsteel-bus-provider/saillun-allsteel-bus-api/src/main/java/io/platform/homepage/dto/ConfigArticleDto.java

@@ -0,0 +1,88 @@
+package io.platform.homepage.dto;
+
+import lombok.Data;
+
+@Data
+public class ConfigArticleDto  implements java.io.Serializable{
+private static final long serialVersionUID = 5454155825314635342L;
+
+
+/**
+ * 文章Id       db_column: MAIN_ID
+ */
+private Long mainId;
+/**
+ * 标题       db_column: TITLE
+ */
+private String title;
+/**
+ * 副标题       db_column: VICE_TITLE
+ */
+private String viceTitle;
+/**
+ * 关键词       db_column: KEYWORDS
+ */
+private String keywords;
+/**
+ * 作者       db_column: AUTHOR
+ */
+private String author;
+/**
+ * 简介       db_column: SUMMARYS
+ */
+private String summarys;
+/**
+ * 图片       db_column: IMAGE_PATH
+ */
+private String imagePath;
+/**
+ * 是否系统文章       db_column: IS_SYS
+ */
+private String isSys;
+/**
+ * 是否外链       db_column: IS_OUTERLINK
+ */
+private String isOuterlink;
+/**
+ * url       db_column: URL
+ */
+private String url;
+/**
+ * 附件地址       db_column: FILE_URL
+ */
+private String fileUrl;
+/**
+ * 发布时间       db_column: PUB_TIME
+ */
+private String pubTime;
+/**
+ * 状态(0禁用/1启用)       db_column: NSTATUS
+ */
+private Long nstatus;
+/**
+ * 排序       db_column: ORDER_INDEX
+ */
+private Long orderIndex;
+/**
+ * 备注       db_column: DESCRIPTION
+ */
+private String description;
+/**
+ * 显示类型(0车主/1门店/2经销商)       db_column: DISPLAY_TYPE
+ */
+private String displayType;
+/**
+ * 文章类别       db_column: TYPE_ID
+ */
+private String typeId;
+/**
+ * contentDetail       db_column: CONTENT_DETAIL
+ */
+private String contentDetail;
+/**
+ * 创建时间       db_column: CREATE_TIME
+ */
+private java.util.Date createTime;
+//columns END
+
+}

+ 32 - 0
sailun-allsteel-bus-provider/saillun-allsteel-bus-api/src/main/java/io/platform/homepage/dto/ConfigSignLvDto.java

@@ -0,0 +1,32 @@
+package io.platform.homepage.dto;
+
+import lombok.Data;
+
+@Data
+public class ConfigSignLvDto  implements java.io.Serializable{
+private static final long serialVersionUID = 5454155825314635342L;
+
+
+/**
+ * 主键       db_column: MAIN_ID
+ */
+private Long mainId;
+/**
+ * ABCD       db_column: SIGN_LV
+ */
+private String signLv;
+/**
+ * 条数       db_column: NUM_TASK
+ */
+private Integer numTask;
+/**
+ * 品牌       db_column: BRAND
+ */
+private String brand;
+/**
+ * 品牌识别码       db_column: CODE
+ */
+private String code;
+//columns END
+
+}

+ 45 - 0
sailun-allsteel-bus-provider/saillun-allsteel-bus-api/src/main/java/io/platform/homepage/service/client/api/ConfigArticleServiceClient.java

@@ -0,0 +1,45 @@
+
+package io.platform.homepage.service.client.api;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.platform.homepage.dto.ConfigArticleDto;
+
+import java.util.List;
+import java.util.Map;
+import io.platform.base.common.utils.ExecuteResult;
+
+
+public interface ConfigArticleServiceClient{
+        /**
+         * 根据ID 查询单个对象
+         */
+        ConfigArticleDto queryObject(Long id);
+        /**
+         * 根据参数查询 列表  无分页
+         */
+        List<ConfigArticleDto>queryList(Map<String, Object> map);
+        /**
+         * 根据参数查询 对应参数的 集合大小
+         */
+        int queryTotal(Map<String, Object> map);
+        /**
+         * 保存对象
+         */
+        ExecuteResult<String> save(ConfigArticleDto configArticleDto);
+        /**
+         * 更新对象
+         */
+        ExecuteResult<String> update(ConfigArticleDto configArticleDto);
+        /**
+         * 根据主键 删除对象
+         */
+        ExecuteResult<String> delete(Long id);
+        /**
+         * 根据主键集合 批量删除
+         */
+        ExecuteResult<String> deleteBatch(List<Long> idList);
+        /**
+         * 根据分页参数 获取 分页集合
+         */
+        Page<ConfigArticleDto>getPage(Page<ConfigArticleDto>page,ConfigArticleDto configArticleDto);
+}

+ 45 - 0
sailun-allsteel-bus-provider/saillun-allsteel-bus-api/src/main/java/io/platform/homepage/service/client/api/ConfigSignLvServiceClient.java

@@ -0,0 +1,45 @@
+
+package io.platform.homepage.service.client.api;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.platform.homepage.dto.ConfigSignLvDto;
+
+import java.util.List;
+import java.util.Map;
+import io.platform.base.common.utils.ExecuteResult;
+
+
+public interface ConfigSignLvServiceClient{
+        /**
+         * 根据ID 查询单个对象
+         */
+        ConfigSignLvDto queryObject(Long id);
+        /**
+         * 根据参数查询 列表  无分页
+         */
+        List<ConfigSignLvDto>queryList(Map<String, Object> map);
+        /**
+         * 根据参数查询 对应参数的 集合大小
+         */
+        int queryTotal(Map<String, Object> map);
+        /**
+         * 保存对象
+         */
+        ExecuteResult<String> save(ConfigSignLvDto configSignLvDto);
+        /**
+         * 更新对象
+         */
+        ExecuteResult<String> update(ConfigSignLvDto configSignLvDto);
+        /**
+         * 根据主键 删除对象
+         */
+        ExecuteResult<String> delete(Long id);
+        /**
+         * 根据主键集合 批量删除
+         */
+        ExecuteResult<String> deleteBatch(List<Long> idList);
+        /**
+         * 根据分页参数 获取 分页集合
+         */
+        Page<ConfigSignLvDto>getPage(Page<ConfigSignLvDto>page,ConfigSignLvDto configSignLvDto);
+}

+ 6 - 1
sailun-allsteel-bus-provider/saillun-allsteel-bus-api/src/main/java/io/platform/log/dto/SysFunctionLogDto.java

@@ -14,7 +14,7 @@ public class    SysFunctionLogDto  implements java.io.Serializable{
     /**
      * 账号id       db_column: ACCOUNT_ID
      */
-    private Long accountId;
+    private String accountId;
     /**
      * 功能名称       db_column: FUNCTION_NAME
      */
@@ -36,4 +36,9 @@ public class    SysFunctionLogDto  implements java.io.Serializable{
     private java.util.Date createTime;
 
 
+    /**
+     * 门店id
+     */
+    private Long storeId;
+
 }

+ 133 - 0
sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/homepage/biz/entity/ConfigArticle.java

@@ -0,0 +1,133 @@
+package io.platform.homepage.biz.entity;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+
+import java.io.Serializable;
+import lombok.Data;
+
+@Data
+@TableName("APP_CONFIG_ARTICLE")
+@KeySequence(value="SEQ_BUS",clazz=Long.class)
+public class ConfigArticle extends Model<ConfigArticle>  implements Serializable{
+
+    private static final long serialVersionUID = 5454155825314635342L;
+
+
+
+    /**
+     * 文章Id       db_column: MAIN_ID
+     */
+    @TableField("MAIN_ID")
+    private Long mainId;
+
+    /**
+     * 标题       db_column: TITLE
+     */
+    @TableField("TITLE")
+    private String title;
+
+    /**
+     * 副标题       db_column: VICE_TITLE
+     */
+    @TableField("VICE_TITLE")
+    private String viceTitle;
+
+    /**
+     * 关键词       db_column: KEYWORDS
+     */
+    @TableField("KEYWORDS")
+    private String keywords;
+
+    /**
+     * 作者       db_column: AUTHOR
+     */
+    @TableField("AUTHOR")
+    private String author;
+
+    /**
+     * 简介       db_column: SUMMARYS
+     */
+    @TableField("SUMMARYS")
+    private String summarys;
+
+    /**
+     * 图片       db_column: IMAGE_PATH
+     */
+    @TableField("IMAGE_PATH")
+    private String imagePath;
+
+    /**
+     * 是否系统文章       db_column: IS_SYS
+     */
+    @TableField("IS_SYS")
+    private String isSys;
+
+    /**
+     * 是否外链       db_column: IS_OUTERLINK
+     */
+    @TableField("IS_OUTERLINK")
+    private String isOuterlink;
+
+    /**
+     * url       db_column: URL
+     */
+    @TableField("URL")
+    private String url;
+
+    /**
+     * 附件地址       db_column: FILE_URL
+     */
+    @TableField("FILE_URL")
+    private String fileUrl;
+
+    /**
+     * 发布时间       db_column: PUB_TIME
+     */
+    @TableField("PUB_TIME")
+    private String pubTime;
+
+    /**
+     * 状态(0禁用/1启用)       db_column: NSTATUS
+     */
+    @TableField("NSTATUS")
+    private Long nstatus;
+
+    /**
+     * 排序       db_column: ORDER_INDEX
+     */
+    @TableField("ORDER_INDEX")
+    private Long orderIndex;
+
+    /**
+     * 备注       db_column: DESCRIPTION
+     */
+    @TableField("DESCRIPTION")
+    private String description;
+
+    /**
+     * 显示类型(0车主/1门店/2经销商)       db_column: DISPLAY_TYPE
+     */
+    @TableField("DISPLAY_TYPE")
+    private String displayType;
+
+    /**
+     * 文章类别       db_column: TYPE_ID
+     */
+    @TableField("TYPE_ID")
+    private String typeId;
+
+    /**
+     * contentDetail       db_column: CONTENT_DETAIL
+     */
+    @TableField("CONTENT_DETAIL")
+    private String contentDetail;
+
+    /**
+     * 创建时间       db_column: CREATE_TIME
+     */
+    @TableField("CREATE_TIME")
+    private java.util.Date createTime;
+//columns END
+
+}

+ 54 - 0
sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/homepage/biz/entity/ConfigSignLv.java

@@ -0,0 +1,54 @@
+package io.platform.homepage.biz.entity;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+
+import java.io.Serializable;
+import lombok.Data;
+
+@Data
+@TableName("APP_CONFIG_SIGN_LV")
+@KeySequence(value="SEQ_BUS",clazz=Long.class)
+public class ConfigSignLv extends Model<ConfigSignLv>  implements Serializable{
+
+    private static final long serialVersionUID = 5454155825314635342L;
+
+
+    /**
+     * 主键       db_column: MAIN_ID
+     */
+    @TableId(value="MAIN_ID", type= IdType.INPUT)
+    private Long mainId;
+
+
+    @Override
+    protected Serializable pkVal() {
+        return this.mainId;
+    }
+
+    /**
+     * ABCD       db_column: SIGN_LV
+     */
+    @TableField("SIGN_LV")
+    private String signLv;
+
+    /**
+     * 条数       db_column: NUM_TASK
+     */
+    @TableField("NUM_TASK")
+    private Integer numTask;
+
+    /**
+     * 品牌       db_column: BRAND
+     */
+    @TableField("BRAND")
+    private String brand;
+
+    /**
+     * 品牌识别码       db_column: CODE
+     */
+    @TableField("CODE")
+    private String code;
+//columns END
+
+}

+ 14 - 0
sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/homepage/biz/mapper/ConfigArticleMapper.java

@@ -0,0 +1,14 @@
+package io.platform.homepage.biz.mapper;
+
+import io.platform.base.common.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import io.platform.homepage.biz.entity.ConfigArticle;
+
+
+/**
+ * Created by sevelli on 2017/9/6.
+ */
+@Mapper
+public interface ConfigArticleMapper extends BaseMapper<ConfigArticle>{
+
+}

+ 14 - 0
sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/homepage/biz/mapper/ConfigSignLvMapper.java

@@ -0,0 +1,14 @@
+package io.platform.homepage.biz.mapper;
+
+import io.platform.base.common.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import io.platform.homepage.biz.entity.ConfigSignLv;
+
+
+/**
+ * Created by sevelli on 2017/9/6.
+ */
+@Mapper
+public interface ConfigSignLvMapper extends BaseMapper<ConfigSignLv>{
+
+}

+ 21 - 0
sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/homepage/biz/service/ConfigArticleService.java

@@ -0,0 +1,21 @@
+
+package io.platform.homepage.biz.service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+import io.platform.homepage.biz.mapper.ConfigArticleMapper;
+import io.platform.homepage.biz.entity.ConfigArticle;
+
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.Map;
+
+@Service("configArticleService")
+public class ConfigArticleService extends ServiceImpl<ConfigArticleMapper,ConfigArticle>{
+
+    public List<ConfigArticle> selectByMap(Map<String, Object> map) {
+        return baseMapper.selectByMap(map);
+    }
+
+}

+ 21 - 0
sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/homepage/biz/service/ConfigSignLvService.java

@@ -0,0 +1,21 @@
+
+package io.platform.homepage.biz.service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+import io.platform.homepage.biz.mapper.ConfigSignLvMapper;
+import io.platform.homepage.biz.entity.ConfigSignLv;
+
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.Map;
+
+@Service("configSignLvService")
+public class ConfigSignLvService extends ServiceImpl<ConfigSignLvMapper,ConfigSignLv>{
+
+    public List<ConfigSignLv> selectByMap(Map<String, Object> map) {
+        return baseMapper.selectByMap(map);
+    }
+
+}

+ 145 - 0
sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/homepage/service/client/impl/ConfigArticleServiceClientImpl.java

@@ -0,0 +1,145 @@
+
+package io.platform.homepage.service.client.impl;
+
+import com.alibaba.dubbo.config.annotation.Service;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+
+import io.platform.base.common.BaseServiceClient;
+import io.platform.base.common.utils.ExecuteResult;
+
+import io.platform.homepage.biz.entity.ConfigArticle;
+import io.platform.homepage.biz.service.ConfigArticleService;
+import io.platform.homepage.dto.ConfigArticleDto;
+import io.platform.homepage.service.client.api.ConfigArticleServiceClient;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.springframework.beans.BeanUtils;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.util.List;
+import java.util.Map;
+
+
+
+@Component
+@Service()
+public class ConfigArticleServiceClientImpl extends BaseServiceClient<ConfigArticle,ConfigArticleDto> implements ConfigArticleServiceClient {
+
+    private Logger logger = LoggerFactory.getLogger(getClass());
+
+    @Resource
+    private ConfigArticleService configArticleService;
+
+    @Override
+    public ConfigArticleDto queryObject(Long id) {
+        ConfigArticle configArticle = configArticleService.getById(id);
+        ConfigArticleDto configArticleDto = new ConfigArticleDto();
+        BeanUtils.copyProperties(configArticle,configArticleDto);
+        return configArticleDto;
+    }
+
+    @Override
+    public List<ConfigArticleDto> queryList(Map<String, Object> map) {
+        List<ConfigArticle> configArticleList = configArticleService.selectByMap(map);
+        return convertList(configArticleList,ConfigArticleDto.class);
+    }
+
+    @Override
+    public int queryTotal(Map<String, Object> map) {
+        QueryWrapper<ConfigArticle> ew = new QueryWrapper<>();
+        ew.allEq(map);
+        return configArticleService.count(ew);
+    }
+
+    @Override
+    public ExecuteResult<String> save(ConfigArticleDto configArticleDto) {
+        ExecuteResult<String> result = new ExecuteResult<String>();
+        try{
+            ConfigArticle configArticle = new ConfigArticle();
+            revert(configArticleDto,configArticle);
+            boolean flag = configArticleService.save(configArticle);
+            if(!flag){
+                result.addErrorMessage("保存失败。");
+            }
+        }
+        catch (Exception e) {
+            logger.error(" 保存错误:" + e.toString(), e);
+            result.addErrorMessage("保存错误:" + e.toString());
+        }
+        return result;
+    }
+
+    @Override
+    public ExecuteResult<String> update(ConfigArticleDto configArticleDto) {
+        ExecuteResult<String> result = new ExecuteResult<String>();
+        try{
+            ConfigArticle configArticle = new ConfigArticle();
+            revert(configArticleDto,configArticle);
+            boolean flag = configArticleService.updateById(configArticle);
+            if(!flag){
+                result.addErrorMessage("更新失败。");
+            }
+        }
+        catch (Exception e) {
+            logger.error(" 更新错误:" + e.toString(), e);
+            result.addErrorMessage("更新错误:" + e.toString());
+        }
+        return result;
+    }
+
+    @Override
+    public ExecuteResult<String> delete(Long id) {
+        ExecuteResult<String> result = new ExecuteResult<String>();
+        try{
+            boolean flag = configArticleService.removeById(id);
+            if(!flag){
+                result.addErrorMessage("删除失败。");
+            }
+        }
+        catch (Exception e) {
+            logger.error(" 删除错误:" + e.toString(), e);
+            result.addErrorMessage("删除错误:" + e.toString());
+        }
+        return result;
+    }
+
+    @Override
+    public ExecuteResult<String> deleteBatch(List<Long> ids) {
+        ExecuteResult<String> result = new ExecuteResult<String>();
+        try{
+            boolean flag = configArticleService.removeByIds(ids);
+            if(!flag){
+                result.addErrorMessage("批量删除失败。");
+            }
+        }
+        catch (Exception e) {
+            logger.error(" 删除错误:" + e.toString(), e);
+            result.addErrorMessage("删除错误:" + e.toString());
+        }
+        return result;
+    }
+
+    @Override
+    public Page<ConfigArticleDto> getPage(Page<ConfigArticleDto> pageDto,ConfigArticleDto configArticleDto) {
+        Page<ConfigArticle> page = new Page<>(pageDto.getCurrent(),pageDto.getSize());
+
+        page.setAsc(pageDto.ascs());
+        page.setDesc(pageDto.descs());
+        page.condition().putAll(pageDto.condition());
+
+        ConfigArticle configArticle = new ConfigArticle();
+        revert(configArticleDto,configArticle);
+
+        QueryWrapper<ConfigArticle> wrapper = new QueryWrapper<>();
+        wrapper.setEntity(configArticle);
+
+        List<ConfigArticleDto> configArticleDtoList = convertList(configArticleService.page(page,wrapper).getRecords(),ConfigArticleDto.class);
+        pageDto.setTotal(configArticleService.count(wrapper));
+        pageDto.setRecords(configArticleDtoList);
+        return pageDto;
+    }
+}

+ 2 - 2
sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/homepage/service/client/impl/ConfigBrandServiceClientImpl.java

@@ -127,9 +127,9 @@ public class ConfigBrandServiceClientImpl extends BaseServiceClient<ConfigBrand,
     public Page<ConfigBrandDto> getPage(Page<ConfigBrandDto> pageDto,ConfigBrandDto configBrandDto) {
         Page<ConfigBrand> page = new Page<>(pageDto.getCurrent(),pageDto.getSize());
 
-        page.setAsc(pageDto.ascs());
+        /*page.setAsc(pageDto.ascs());
         page.setDesc(pageDto.descs());
-        page.condition().putAll(pageDto.condition());
+        page.condition().putAll(pageDto.condition());*/
 
         ConfigBrand configBrand = new ConfigBrand();
         revert(configBrandDto,configBrand);

+ 145 - 0
sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/homepage/service/client/impl/ConfigSignLvServiceClientImpl.java

@@ -0,0 +1,145 @@
+
+package io.platform.homepage.service.client.impl;
+
+import com.alibaba.dubbo.config.annotation.Service;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+
+import io.platform.base.common.BaseServiceClient;
+import io.platform.base.common.utils.ExecuteResult;
+
+import io.platform.homepage.biz.entity.ConfigSignLv;
+import io.platform.homepage.biz.service.ConfigSignLvService;
+import io.platform.homepage.dto.ConfigSignLvDto;
+import io.platform.homepage.service.client.api.ConfigSignLvServiceClient;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.springframework.beans.BeanUtils;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.Resource;
+import java.util.List;
+import java.util.Map;
+
+
+
+@Component
+@Service()
+public class ConfigSignLvServiceClientImpl extends BaseServiceClient<ConfigSignLv,ConfigSignLvDto> implements ConfigSignLvServiceClient {
+
+    private Logger logger = LoggerFactory.getLogger(getClass());
+
+    @Resource
+    private ConfigSignLvService configSignLvService;
+
+    @Override
+    public ConfigSignLvDto queryObject(Long id) {
+        ConfigSignLv configSignLv = configSignLvService.getById(id);
+        ConfigSignLvDto configSignLvDto = new ConfigSignLvDto();
+        BeanUtils.copyProperties(configSignLv,configSignLvDto);
+        return configSignLvDto;
+    }
+
+    @Override
+    public List<ConfigSignLvDto> queryList(Map<String, Object> map) {
+        List<ConfigSignLv> configSignLvList = configSignLvService.selectByMap(map);
+        return convertList(configSignLvList,ConfigSignLvDto.class);
+    }
+
+    @Override
+    public int queryTotal(Map<String, Object> map) {
+        QueryWrapper<ConfigSignLv> ew = new QueryWrapper<>();
+        ew.allEq(map);
+        return configSignLvService.count(ew);
+    }
+
+    @Override
+    public ExecuteResult<String> save(ConfigSignLvDto configSignLvDto) {
+        ExecuteResult<String> result = new ExecuteResult<String>();
+        try{
+            ConfigSignLv configSignLv = new ConfigSignLv();
+            revert(configSignLvDto,configSignLv);
+            boolean flag = configSignLvService.save(configSignLv);
+            if(!flag){
+                result.addErrorMessage("保存失败。");
+            }
+        }
+        catch (Exception e) {
+            logger.error(" 保存错误:" + e.toString(), e);
+            result.addErrorMessage("保存错误:" + e.toString());
+        }
+        return result;
+    }
+
+    @Override
+    public ExecuteResult<String> update(ConfigSignLvDto configSignLvDto) {
+        ExecuteResult<String> result = new ExecuteResult<String>();
+        try{
+            ConfigSignLv configSignLv = new ConfigSignLv();
+            revert(configSignLvDto,configSignLv);
+            boolean flag = configSignLvService.updateById(configSignLv);
+            if(!flag){
+                result.addErrorMessage("更新失败。");
+            }
+        }
+        catch (Exception e) {
+            logger.error(" 更新错误:" + e.toString(), e);
+            result.addErrorMessage("更新错误:" + e.toString());
+        }
+        return result;
+    }
+
+    @Override
+    public ExecuteResult<String> delete(Long id) {
+        ExecuteResult<String> result = new ExecuteResult<String>();
+        try{
+            boolean flag = configSignLvService.removeById(id);
+            if(!flag){
+                result.addErrorMessage("删除失败。");
+            }
+        }
+        catch (Exception e) {
+            logger.error(" 删除错误:" + e.toString(), e);
+            result.addErrorMessage("删除错误:" + e.toString());
+        }
+        return result;
+    }
+
+    @Override
+    public ExecuteResult<String> deleteBatch(List<Long> ids) {
+        ExecuteResult<String> result = new ExecuteResult<String>();
+        try{
+            boolean flag = configSignLvService.removeByIds(ids);
+            if(!flag){
+                result.addErrorMessage("批量删除失败。");
+            }
+        }
+        catch (Exception e) {
+            logger.error(" 删除错误:" + e.toString(), e);
+            result.addErrorMessage("删除错误:" + e.toString());
+        }
+        return result;
+    }
+
+    @Override
+    public Page<ConfigSignLvDto> getPage(Page<ConfigSignLvDto> pageDto,ConfigSignLvDto configSignLvDto) {
+        Page<ConfigSignLv> page = new Page<>(pageDto.getCurrent(),pageDto.getSize());
+
+        /*page.setAsc(pageDto.ascs());
+        page.setDesc(pageDto.descs());
+        page.condition().putAll(pageDto.condition());*/
+
+        ConfigSignLv configSignLv = new ConfigSignLv();
+        revert(configSignLvDto,configSignLv);
+
+        QueryWrapper<ConfigSignLv> wrapper = new QueryWrapper<>();
+        wrapper.setEntity(configSignLv);
+
+        List<ConfigSignLvDto> configSignLvDtoList = convertList(configSignLvService.page(page,wrapper).getRecords(),ConfigSignLvDto.class);
+        pageDto.setTotal(configSignLvService.count(wrapper));
+        pageDto.setRecords(configSignLvDtoList);
+        return pageDto;
+    }
+}

+ 8 - 1
sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/java/io/platform/log/biz/entity/SysFunctionLog.java

@@ -30,7 +30,7 @@ public class SysFunctionLog extends Model<SysFunctionLog>  implements Serializab
      * 账号id       db_column: ACCOUNT_ID
      */
     @TableField("ACCOUNT_ID")
-    private Long accountId;
+    private String accountId;
 
     /**
      * 功能名称       db_column: FUNCTION_NAME
@@ -58,4 +58,11 @@ public class SysFunctionLog extends Model<SysFunctionLog>  implements Serializab
     private java.util.Date createTime;
 //columns END
 
+
+    /**
+     * 门店id
+     */
+    @TableField("STORE_ID")
+    private Long storeId;
+
 }

+ 8 - 0
sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/resources/mybatis/hompage/ConfigArticleMapper.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="io.platform.homepage.biz.mapper.ConfigArticleMapper">
+
+
+
+</mapper>

+ 8 - 0
sailun-allsteel-bus-provider/sailun-allsteel-bus-service/src/main/resources/mybatis/hompage/ConfigSignLvMapper.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
+<mapper namespace="io.platform.homepage.biz.mapper.ConfigSignLvMapper">
+
+
+
+</mapper>