1. 修改了提现记录列表的Bug

2. 修改了动态表单因为开启cache缓存导致数据不全不更新的Bug(不使用缓存)
3. 调试控制台增加了调试接口的配置
4. 修改了企业认证的功能
This commit is contained in:
cuibaocheng 2021-09-23 14:05:23 +08:00
parent e82b8178eb
commit 3463e730aa
31 changed files with 646 additions and 320 deletions

View File

@ -21,12 +21,12 @@ import java.util.Map;
/**
* @ClassName: ShopCertificationController
* @Description: 店铺认证
* @Description: 企业认证
* @Author: CodeFactory
* @Date: 2021-04-07 17:47:38
* @Version: 3.0
**/
@Api(tags = ISystemConstant.API_TAGS_SYSTEM_PREFIX + "店铺认证接口")
@Api(tags = ISystemConstant.API_TAGS_SYSTEM_PREFIX + "企业认证接口")
@RestController
@RequestMapping(ISystemConstant.API_PREFIX + "/shopcertification")
public class ShopCertificationController extends DefaultBaseController {
@ -34,9 +34,9 @@ public class ShopCertificationController extends DefaultBaseController {
@Autowired
private IShopCertificationService shopCertificationService;
@ApiOperation(value = "修改店铺认证状态", notes = "修改店铺认证接口")
@ApiOperation(value = "修改企业认证状态", notes = "修改企业认证接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "shopCertificationId", value = "店铺认证ID", paramType = "path")
@ApiImplicitParam(name = "shopCertificationId", value = "企业认证ID", paramType = "path")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PutMapping("updateAuditStatus/{shopCertificationId}/{auditStatus}")
@ -45,7 +45,7 @@ public class ShopCertificationController extends DefaultBaseController {
return new SuccessResult();
}
@ApiOperation(value = "新增店铺认证", notes = "新增店铺认证接口")
@ApiOperation(value = "新增企业认证", notes = "新增企业认证接口")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PostMapping("save")
@CheckRequestBodyAnnotation
@ -54,7 +54,7 @@ public class ShopCertificationController extends DefaultBaseController {
return new SuccessResult();
}
@ApiOperation(value = "删除店铺认证", notes = "删除店铺认证接口")
@ApiOperation(value = "删除企业认证", notes = "删除企业认证接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "ids", value = "ID列表用下划线分隔", paramType = "path", example = "1_2_3")
})
@ -65,9 +65,9 @@ public class ShopCertificationController extends DefaultBaseController {
return new SuccessResult();
}
@ApiOperation(value = "修改店铺认证", notes = "修改店铺认证接口")
@ApiOperation(value = "修改企业认证", notes = "修改企业认证接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "shopCertificationId", value = "店铺认证ID", paramType = "path")
@ApiImplicitParam(name = "shopCertificationId", value = "企业认证ID", paramType = "path")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PutMapping("update/{shopCertificationId}")
@ -77,9 +77,9 @@ public class ShopCertificationController extends DefaultBaseController {
return new SuccessResult();
}
@ApiOperation(value = "店铺认证详情", notes = "店铺认证详情接口")
@ApiOperation(value = "企业认证详情", notes = "企业认证详情接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "shopCertificationId", value = "店铺认证ID", paramType = "path")
@ApiImplicitParam(name = "shopCertificationId", value = "企业认证ID", paramType = "path")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("get/{shopCertificationId}")
@ -87,7 +87,7 @@ public class ShopCertificationController extends DefaultBaseController {
return shopCertificationService.get(shopCertificationId);
}
@ApiOperation(value = "店铺认证列表", notes = "店铺认证列表接口")
@ApiOperation(value = "企业认证列表", notes = "企业认证列表接口")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("list")
public List<ShopCertificationDTO> list() {
@ -95,7 +95,7 @@ public class ShopCertificationController extends DefaultBaseController {
return shopCertificationService.list(params);
}
@ApiOperation(value = "店铺认证分页列表", notes = "店铺认证分页列表接口")
@ApiOperation(value = "企业认证分页列表", notes = "企业认证分页列表接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"),
@ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"),
@ -111,7 +111,7 @@ public class ShopCertificationController extends DefaultBaseController {
return shopCertificationService.listPage(page);
}
@ApiOperation(value = "店铺认证统计", notes = "店铺认证统计接口")
@ApiOperation(value = "企业认证统计", notes = "企业认证统计接口")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("count")
SuccessResultData<Integer> count() {

View File

@ -2,8 +2,12 @@ package cn.com.tenlion.systemcard.controller.app.api.accountwithdraw;
import ink.wgink.annotation.CheckRequestBodyAnnotation;
import ink.wgink.common.base.DefaultBaseController;
import ink.wgink.common.component.SecurityComponent;
import ink.wgink.exceptions.SearchException;
import ink.wgink.interfaces.consts.ISystemConstant;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.app.AppTokenUser;
import ink.wgink.pojo.bos.UserInfoBO;
import ink.wgink.pojo.result.ErrorResult;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultData;
@ -12,6 +16,7 @@ import cn.com.tenlion.systemcard.pojo.dtos.accountwithdraw.AccountWithdrawDTO;
import cn.com.tenlion.systemcard.pojo.vos.accountwithdraw.AccountWithdrawVO;
import cn.com.tenlion.systemcard.service.accountwithdraw.IAccountWithdrawService;
import io.swagger.annotations.*;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@ -32,6 +37,21 @@ public class AccountWithdrawAppController extends DefaultBaseController {
@Autowired
private IAccountWithdrawService accountWithdrawService;
@Autowired
protected SecurityComponent securityComponent;
private String getUserId(String token) throws Exception {
String userId = "notUserId";
if (StringUtils.isBlank(token)) {
UserInfoBO userInfoBO = securityComponent.getCurrentUser();
userId = userInfoBO.getUserId();
} else {
AppTokenUser appTokenUser = securityComponent.getAppTokenUser(token);
userId = appTokenUser.getId();
}
return userId;
}
@ApiOperation(value = "新增CBC账户提现表", notes = "新增CBC账户提现表接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header")
@ -55,8 +75,10 @@ public class AccountWithdrawAppController extends DefaultBaseController {
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("listpage")
public SuccessResultList<List<AccountWithdrawDTO>> listPage(@RequestHeader("token") String token, ListPage page) {
public SuccessResultList<List<AccountWithdrawDTO>> listPage(@RequestHeader("token") String token, ListPage page) throws Exception {
Map<String, Object> params = requestParams();
String userId = getUserId(token);
params.put("accountWithdrawUserId", userId);// 申请人ID
page.setParams(params);
return accountWithdrawService.listPage(page);
}

View File

@ -8,6 +8,8 @@ import ink.wgink.common.component.SecurityComponent;
import ink.wgink.exceptions.SearchException;
import ink.wgink.interfaces.consts.ISystemConstant;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.app.AppTokenUser;
import ink.wgink.pojo.bos.UserInfoBO;
import ink.wgink.pojo.result.ErrorResult;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultData;
@ -42,6 +44,18 @@ public class CardTemplateScansAppController extends DefaultBaseController {
@Autowired
protected SecurityComponent securityComponent;
private String getUserId(String token) throws Exception {
String userId = "notUserId";
if (StringUtils.isBlank(token)) {
UserInfoBO userInfoBO = securityComponent.getCurrentUser();
userId = userInfoBO.getUserId();
} else {
AppTokenUser appTokenUser = securityComponent.getAppTokenUser(token);
userId = appTokenUser.getId();
}
return userId;
}
@ApiOperation(value = "保存查看记录", notes = "保存查看记录接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header")
@ -95,14 +109,9 @@ public class CardTemplateScansAppController extends DefaultBaseController {
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("listpage/{type}")
public SuccessResultList<List<CardTemplateScansDTO>> listPage(@RequestHeader("token") String token, ListPage page, @PathVariable("type") String type) {
public SuccessResultList<List<CardTemplateScansDTO>> listPage(@RequestHeader("token") String token, ListPage page, @PathVariable("type") String type) throws Exception {
Map<String, Object> params = requestParams();
String userId = "";
try {
userId = securityComponent.getAppTokenUser(token).getId();
}catch(Exception e) {
throw new SearchException("没有登陆信息");
}
String userId = getUserId(token);
if("1".equals(type)) {
// 我看过谁
params.put("creator", userId);

View File

@ -28,12 +28,12 @@ import java.util.Map;
/**
* @ClassName: ShopCertificationAppController
* @Description: 店铺认证
* @Description: 企业认证
* @Author: CodeFactory
* @Date: 2021-04-07 17:47:38
* @Version: 3.0
**/
@Api(tags = ISystemConstant.API_TAGS_APP_PREFIX + "店铺认证接口")
@Api(tags = ISystemConstant.API_TAGS_APP_PREFIX + "企业认证接口")
@RestController
@RequestMapping(ISystemConstant.APP_PREFIX + "/shopcertification")
public class ShopCertificationAppController extends DefaultBaseController {
@ -63,19 +63,19 @@ public class ShopCertificationAppController extends DefaultBaseController {
return OCRBusinessLicenseUtil.businessLicenseFile(filePO.getFilePath());
}
@ApiOperation(value = "新增店铺认证", notes = "新增店铺认证接口")
@ApiOperation(value = "新增企业认证", notes = "新增企业认证接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PostMapping("save")
@CheckRequestBodyAnnotation
public SuccessResult save(@RequestHeader("token") String token, @RequestBody ShopCertificationVO shopCertificationVO) {
public synchronized SuccessResult save(@RequestHeader("token") String token, @RequestBody ShopCertificationVO shopCertificationVO) {
shopCertificationService.save(token, shopCertificationVO);
return new SuccessResult();
}
@ApiOperation(value = "删除店铺认证(id列表)", notes = "删除店铺认证(id列表)接口")
@ApiOperation(value = "删除企业认证(id列表)", notes = "删除企业认证(id列表)接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
@ApiImplicitParam(name = "ids", value = "ID列表用下划线分隔", paramType = "path", example = "1_2_3")
@ -87,23 +87,23 @@ public class ShopCertificationAppController extends DefaultBaseController {
return new SuccessResult();
}
@ApiOperation(value = "修改店铺认证", notes = "修改店铺认证接口")
@ApiOperation(value = "修改企业认证", notes = "修改企业认证接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
@ApiImplicitParam(name = "shopCertificationId", value = "店铺认证ID", paramType = "path")
@ApiImplicitParam(name = "shopCertificationId", value = "企业认证ID", paramType = "path")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PutMapping("updateshopcertification/{shopCertificationId}")
@PutMapping("update/{shopCertificationId}")
@CheckRequestBodyAnnotation
public SuccessResult updateShopCertification(@RequestHeader("token") String token, @PathVariable("shopCertificationId") String shopCertificationId, @RequestBody ShopCertificationVO shopCertificationVO) {
shopCertificationService.update(token, shopCertificationId, shopCertificationVO);
return new SuccessResult();
}
@ApiOperation(value = "店铺认证详情(通过ID)", notes = "店铺认证详情(通过ID)接口")
@ApiOperation(value = "企业认证详情(通过ID)", notes = "企业认证详情(通过ID)接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
@ApiImplicitParam(name = "shopCertificationId", value = "店铺认证ID", paramType = "path")
@ApiImplicitParam(name = "shopCertificationId", value = "企业认证ID", paramType = "path")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("get/{shopCertificationId}")
@ -111,7 +111,7 @@ public class ShopCertificationAppController extends DefaultBaseController {
return shopCertificationService.get(shopCertificationId);
}
@ApiOperation(value = "店铺认证列表", notes = "店铺认证列表接口")
@ApiOperation(value = "企业认证列表", notes = "企业认证列表接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header")
})
@ -122,7 +122,7 @@ public class ShopCertificationAppController extends DefaultBaseController {
return shopCertificationService.list(params);
}
@ApiOperation(value = "店铺认证分页列表", notes = "店铺认证分页列表接口")
@ApiOperation(value = "企业认证分页列表", notes = "企业认证分页列表接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"),
@ -132,14 +132,14 @@ public class ShopCertificationAppController extends DefaultBaseController {
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("listpageshopcertification")
@GetMapping("listpage")
public SuccessResultList<List<ShopCertificationDTO>> listPage(@RequestHeader("token") String token, ListPage page) {
Map<String, Object> params = requestParams();
page.setParams(params);
return shopCertificationService.listPage(page);
}
@ApiOperation(value = "店铺认证统计", notes = "店铺认证统计接口")
@ApiOperation(value = "企业认证统计", notes = "企业认证统计接口")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("count")
SuccessResultData<Integer> count() {

View File

@ -1,6 +1,7 @@
package cn.com.tenlion.systemcard.controller.route.cardconsole;
import cn.com.tenlion.projectconfig.util.ProjectConfigUtil;
import cn.com.tenlion.systemcard.socket.CardLogSocket;
import ink.wgink.common.base.DefaultBaseController;
import ink.wgink.interfaces.consts.ISystemConstant;
import ink.wgink.properties.ServerProperties;
@ -30,6 +31,7 @@ public class CardConsoleRouteController extends DefaultBaseController {
public ModelAndView save() {
ModelAndView mv = new ModelAndView("cardconsole/console");
mv.addObject("webSocketConsole", ProjectConfigUtil.getText("webSocketConsole"));
mv.addObject("listenerPath", CardLogSocket.listenerPath);
return mv;
}

View File

@ -14,7 +14,7 @@ import java.util.Map;
/**
* @ClassName: IShopCertificationDao
* @Description: 店铺认证
* @Description: 企业认证
* @Author: CodeFactory
* @Date: 2021-04-07 17:47:38
* @Version: 3.0
@ -33,7 +33,7 @@ public interface IShopCertificationDao {
/**
* 新增店铺认证
* 新增企业认证
*
* @param params
* @throws SaveException
@ -41,7 +41,7 @@ public interface IShopCertificationDao {
void save(Map<String, Object> params) throws SaveException;
/**
* 删除店铺认证
* 删除企业认证
*
* @param params
* @throws RemoveException
@ -49,7 +49,7 @@ public interface IShopCertificationDao {
void remove(Map<String, Object> params) throws RemoveException;
/**
* 删除店铺认证物理
* 删除企业认证物理
*
* @param params
* @throws RemoveException
@ -57,7 +57,7 @@ public interface IShopCertificationDao {
void delete(Map<String, Object> params) throws RemoveException;
/**
* 修改店铺认证
* 修改企业认证
*
* @param params
* @throws UpdateException
@ -65,7 +65,7 @@ public interface IShopCertificationDao {
void update(Map<String, Object> params) throws UpdateException;
/**
* 店铺认证详情
* 企业认证详情
*
* @param params
* @return
@ -74,7 +74,7 @@ public interface IShopCertificationDao {
ShopCertificationDTO get(Map<String, Object> params) throws SearchException;
/**
* 店铺认证详情
* 企业认证详情
*
* @param params
* @return
@ -83,7 +83,7 @@ public interface IShopCertificationDao {
ShopCertificationBO getBO(Map<String, Object> params) throws SearchException;
/**
* 店铺认证详情
* 企业认证详情
*
* @param params
* @return
@ -92,7 +92,7 @@ public interface IShopCertificationDao {
ShopCertificationPO getPO(Map<String, Object> params) throws SearchException;
/**
* 店铺认证列表
* 企业认证列表
*
* @param params
* @return
@ -101,7 +101,7 @@ public interface IShopCertificationDao {
List<ShopCertificationDTO> list(Map<String, Object> params) throws SearchException;
/**
* 店铺认证列表
* 企业认证列表
*
* @param params
* @return
@ -110,7 +110,7 @@ public interface IShopCertificationDao {
List<ShopCertificationBO> listBO(Map<String, Object> params) throws SearchException;
/**
* 店铺认证列表
* 企业认证列表
*
* @param params
* @return
@ -119,7 +119,7 @@ public interface IShopCertificationDao {
List<ShopCertificationPO> listPO(Map<String, Object> params) throws SearchException;
/**
* 店铺认证统计
* 企业认证统计
*
* @param params
* @return
@ -127,4 +127,11 @@ public interface IShopCertificationDao {
*/
Integer count(Map<String, Object> params) throws SearchException;
/**
* 查询统一信用代码证
* @param certificationId
* @return
*/
ShopCertificationDTO getByCertificationId(String certificationId) throws SearchException;
}

View File

@ -2,15 +2,29 @@ package cn.com.tenlion.systemcard.filter;
import cn.com.tenlion.projectconfig.util.ProjectConfigUtil;
import cn.com.tenlion.systemcard.socket.CardLogSocket;
import com.alibaba.fastjson.JSON;
import ink.wgink.common.advice.ResponseAdvice;
import ink.wgink.common.component.SecurityComponent;
import ink.wgink.exceptions.*;
import ink.wgink.exceptions.base.SystemException;
import ink.wgink.pojo.app.AppTokenUser;
import ink.wgink.pojo.result.ErrorResult;
import ink.wgink.util.AesUtil;
import ink.wgink.util.ReflectUtil;
import ink.wgink.util.date.DateUtil;
import ink.wgink.util.map.HashMapUtil;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;
import org.springframework.http.HttpStatus;
import org.springframework.security.authentication.InsufficientAuthenticationException;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.HandlerExceptionResolver;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
@ -18,13 +32,17 @@ import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.io.UnsupportedEncodingException;
import java.sql.SQLSyntaxErrorException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
@ControllerAdvice
// @Order(Ordered.LOWEST_PRECEDENCE)
public class CardAppException {
private static final Logger LOG = LoggerFactory.getLogger(CardAppException.class);
@Autowired
CardLogSocket cardLogSocket;
@ -32,28 +50,24 @@ public class CardAppException {
@Autowired
protected SecurityComponent securityComponent;
@ExceptionHandler(Exception.class)
public ModelAndView customException(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Exception e) {
@ResponseBody
@ExceptionHandler({SystemException.class, SQLSyntaxErrorException.class, Exception.class, HashMapUtil.TypeConversionException.class, ReflectUtil.ReflectException.class})
public void customException(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Exception e) throws IOException {
if (!ProjectConfigUtil.getSwitch("consoleDebugSwitch")) {
return null;
return;
}
e.printStackTrace();
HttpServletRequest httpRequest = (HttpServletRequest) httpServletRequest;
String token = httpRequest.getHeader("token");
String url = httpRequest.getRequestURI();
if(!url.contains("/app/")) {
return null;
}
String url = httpRequest.getServletPath();
if(url.matches(".*/(" + cardLogSocket.listenerPath + ").*")){
if(!StringUtils.isEmpty(token) && !StringUtils.isEmpty(cardLogSocket.selectUser)) {
AppTokenUser appTokenUser = null;
try {
appTokenUser = securityComponent.getAppTokenUser(token);
} catch (ReflectUtil.ReflectException e1) {
}
if(appTokenUser == null || !cardLogSocket.selectUser.equals(appTokenUser.getId())) {
return null;
}
}
if(!StringUtils.isEmpty(cardLogSocket.selectUser)) {
if(appTokenUser != null && cardLogSocket.selectUser.equals(appTokenUser.getId())) {
// 此方式支持form-data传参方式参数获取其他传参方式请自行研究
Map<String, String[]> parameterMap = httpRequest.getParameterMap();
List<String> parameterList = new ArrayList<>();
@ -73,7 +87,109 @@ public class CardAppException {
String log = "Exception" + e.getMessage();
cardLogSocket.sendAll(log);
}
return null;
}
}else{
// 此方式支持form-data传参方式参数获取其他传参方式请自行研究
Map<String, String[]> parameterMap = httpRequest.getParameterMap();
List<String> parameterList = new ArrayList<>();
parameterMap.forEach((key, value) -> {
parameterList.add(key + ":" + Arrays.toString(value));
});
String clientIp = httpRequest.getHeader("x-forwarded-for");
if (clientIp == null) {
clientIp = httpRequest.getRemoteAddr();
}
if(cardLogSocket.exceptionDescription) {
StringWriter trace = new StringWriter();
e.printStackTrace(new PrintWriter(trace));
String log = "Exception" + e.getMessage() + "\r\n" + trace.toString();
cardLogSocket.sendAll(log);
}else{
String log = "Exception" + e.getMessage();
cardLogSocket.sendAll(log);
}
}
}
}
responseException(httpServletRequest, httpServletResponse, e);
}
public void responseException(HttpServletRequest request, HttpServletResponse response, Exception e) throws IOException {
if (e instanceof InsufficientAuthenticationException) {
throw new InsufficientAuthenticationException(e.getMessage());
} else {
if (e instanceof FileException) {
LOG.error(e.getMessage());
} else if (e instanceof ParamsException) {
LOG.error(e.getMessage());
} else {
LOG.error(e.getMessage(), e);
}
ErrorResult result = new ErrorResult(ErrorResult.ErrorResultCodeEnum.SYSTEM_ERROR.getValue(), "系统错误");
if (e instanceof SaveException) {
result.setCode(ErrorResult.ErrorResultCodeEnum.SAVE_ERROR.getValue());
} else if (e instanceof RemoveException) {
result.setCode(ErrorResult.ErrorResultCodeEnum.REMOVE_ERROR.getValue());
} else if (e instanceof UpdateException) {
result.setCode(ErrorResult.ErrorResultCodeEnum.UPDATE_ERROR.getValue());
} else if (e instanceof SearchException) {
result.setCode(ErrorResult.ErrorResultCodeEnum.QUERY_ERROR.getValue());
} else if (e instanceof ParamsException) {
result.setCode(ErrorResult.ErrorResultCodeEnum.PARAMS_ERROR.getValue());
} else if (e instanceof FileException) {
result.setCode(ErrorResult.ErrorResultCodeEnum.FILE_ERROR.getValue());
} else if (e instanceof AppTokenException) {
result.setCode(ErrorResult.ErrorResultCodeEnum.APP_DEPENDENCY_ERROR.getValue());
} else if (e instanceof AppDeviceException) {
result.setCode(ErrorResult.ErrorResultCodeEnum.DEVICE_ERROR.getValue());
} else if (e instanceof AppVersionException) {
result.setCode(ErrorResult.ErrorResultCodeEnum.DEVICE_VERSION_ERROR.getValue());
} else if (e instanceof PropertiesException) {
result.setCode(ErrorResult.ErrorResultCodeEnum.PROPERTIES_ERROR.getValue());
} else if (e instanceof AccessTokenException) {
response.setStatus(HttpStatus.UNAUTHORIZED.value());
}
if (e instanceof SystemException) {
result.setMsg(e.getMessage());
} else if (e instanceof UnsupportedEncodingException) {
result.setCode(ErrorResult.ErrorResultCodeEnum.ENCODE_ERROR.getValue());
result.setMsg(e.getMessage());
} else if (e instanceof AesUtil.AesEncodeException) {
result.setCode(ErrorResult.ErrorResultCodeEnum.ENCODE_ERROR.getValue());
result.setMsg(e.getMessage());
} else if (e instanceof AesUtil.AesDecodeException) {
result.setCode(ErrorResult.ErrorResultCodeEnum.DECODE_ERROR.getValue());
result.setMsg(e.getMessage());
} else if (e instanceof ReflectUtil.ReflectException) {
result.setCode(ErrorResult.ErrorResultCodeEnum.SYSTEM_ERROR.getValue());
} else {
StringBuilder errorMessageSB = new StringBuilder();
StackTraceElement[] var6 = e.getStackTrace();
int var7 = var6.length;
for(int var8 = 0; var8 < var7; ++var8) {
StackTraceElement stackTraceElement = var6[var8];
errorMessageSB.append(stackTraceElement.toString()).append("\n");
}
result.setDetail(errorMessageSB.toString());
result.setDetail(e.getMessage());
}
String contentType = request.getContentType();
if (contentType != null && contentType.contains("application/json")) {
response.setCharacterEncoding("UTF-8");
response.setContentType("application/json");
response.setStatus(HttpStatus.BAD_REQUEST.value());
response.getWriter().write(JSON.toJSONString(result));
} else {
request.getSession().setAttribute("errorMessage", JSON.toJSONString(result));
}
}
}
}

View File

@ -45,8 +45,8 @@ public class CardAppFilter extends DefaultBaseController implements Filter {
}
HttpServletRequest httpRequest = (HttpServletRequest) servletRequest;
String token = httpRequest.getHeader("token");
String url = httpRequest.getRequestURI();
if(!url.contains("/app/")) {
String url = httpRequest.getServletPath();
if(!url.matches(".*/(" + cardLogSocket.listenerPath + ").*")){
filterChain.doFilter(servletRequest, servletResponse);
return;
}

View File

@ -3,7 +3,7 @@ package cn.com.tenlion.systemcard.pojo.bos.shopcertification;
/**
*
* @ClassName: ShopCertificationBO
* @Description: 店铺认证
* @Description: 企业认证
* @Author: CodeFactory
* @Date: 2021-04-07 17:47:38
* @Version: 3.0

View File

@ -38,7 +38,7 @@ public class ShopDTO {
private String industryName;
@ApiModelProperty(name = "industryId", value = "店铺行业ID")
private String industryId;
@ApiModelProperty(name = "shopCertificationId", value = "店铺认证ID")
@ApiModelProperty(name = "shopCertificationId", value = "企业认证ID")
private String shopCertificationId;
@ApiModelProperty(name = "auditStatus", value = "店铺审核状态")
private Integer auditStatus;

View File

@ -6,7 +6,7 @@ import io.swagger.annotations.ApiModelProperty;
/**
*
* @ClassName: ShopCertificationDTO
* @Description: 店铺认证
* @Description: 企业认证
* @Author: CodeFactory
* @Date: 2021-04-07 17:47:38
* @Version: 3.0
@ -14,18 +14,12 @@ import io.swagger.annotations.ApiModelProperty;
@ApiModel
public class ShopCertificationDTO {
@ApiModelProperty(name = "shopCertificationId", value = "店铺认证ID")
@ApiModelProperty(name = "shopCertificationId", value = "企业认证ID")
private String shopCertificationId;
@ApiModelProperty(name = "shopId", value = "店铺ID")
private String shopId;
@ApiModelProperty(name = "certificationCertificate", value = "企业认证授权书")
private String certificationCertificate;
@ApiModelProperty(name = "shopName", value = "店铺名称")
private String shopName;
@ApiModelProperty(name = "certificationImage", value = "营业执照照片")
private String certificationImage;
@ApiModelProperty(name = "certificationId", value = "统一信用代码")
private String certificationId;
@ApiModelProperty(name = "certificationNumber", value = "证书编号")
private String certificationNumber;
@ApiModelProperty(name = "certificationName", value = "企业名称")
private String certificationName;
@ApiModelProperty(name = "certificationType", value = "企业类型")
@ -42,13 +36,19 @@ public class ShopCertificationDTO {
private String certificationLicenseTerm;
@ApiModelProperty(name = "certificationBusiness", value = "企业经营范围")
private String certificationBusiness;
@ApiModelProperty(name = "certificationAuthority", value = "登记机关")
@ApiModelProperty(name = "certificationCertificate", value = "企业授权书(新增字段)")
private String certificationCertificate;
@ApiModelProperty(name = "certificationNumber", value = "证书编号(该字段已取消)")
private String certificationNumber;
@ApiModelProperty(name = "certificationAuthority", value = "登记机关(该字段已取消)")
private String certificationAuthority;
@ApiModelProperty(name = "certificationComposition", value = "企业组成形式")
@ApiModelProperty(name = "certificationComposition", value = "企业组成形式(该字段已取消)")
private String certificationComposition;
@ApiModelProperty(name = "营业执照图片", value = "营业执照图片")
private String certificationImage;
@ApiModelProperty(name = "审核状态", value = "0 未审核 1审核通过 -1审核不通过")
@ApiModelProperty(name = "shopId", value = "店铺ID")
private String shopId;
@ApiModelProperty(name = "shopName", value = "店铺名称")
private String shopName;
@ApiModelProperty(name = "auditStatus", value = "审核状态 0 未审核 1审核通过 -1审核不通过")
private Integer auditStatus;
@ApiModelProperty(name = "gmtCreate", value = "申请时间")
private String gmtCreate;
@ -59,6 +59,14 @@ public class ShopCertificationDTO {
@ApiModelProperty(name = "auditResult", value = "审核说明")
private String auditResult;
public String getShopName() {
return shopName == null ? "" : shopName;
}
public void setShopName(String shopName) {
this.shopName = shopName;
}
public String getCertificationCertificate() {
return certificationCertificate == null ? "" : certificationCertificate;
}
@ -171,7 +179,6 @@ public class ShopCertificationDTO {
this.certificationComposition = certificationComposition;
}
public String getShopId() {
return shopId;
}
@ -180,14 +187,6 @@ public class ShopCertificationDTO {
this.shopId = shopId;
}
public String getShopName() {
return shopName;
}
public void setShopName(String shopName) {
this.shopName = shopName;
}
public String getCertificationImage() {
return certificationImage;
}

View File

@ -3,7 +3,7 @@ package cn.com.tenlion.systemcard.pojo.pos.shopcertification;
/**
*
* @ClassName: ShopCertificationPO
* @Description: 店铺认证
* @Description: 企业认证
* @Author: CodeFactory
* @Date: 2021-04-07 17:47:38
* @Version: 3.0

View File

@ -1,12 +1,13 @@
package cn.com.tenlion.systemcard.pojo.vos.shopcertification;
import ink.wgink.annotation.CheckEmptyAnnotation;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
*
* @ClassName: ShopCertificationVO
* @Description: 店铺认证
* @Description: 企业认证
* @Author: CodeFactory
* @Date: 2021-04-07 17:47:38
* @Version: 3.0
@ -14,34 +15,55 @@ import io.swagger.annotations.ApiModelProperty;
@ApiModel
public class ShopCertificationVO {
@ApiModelProperty(name = "certificationImage", value = "营业执照照片")
@CheckEmptyAnnotation(name = "营业执照照片")
private String certificationImage;
@ApiModelProperty(name = "certificationId", value = "统一信用代码")
@CheckEmptyAnnotation(name = "统一信用代码")
private String certificationId;
@ApiModelProperty(name = "shopId", value = "店铺ID")
private String shopId;
@ApiModelProperty(name = "certificationNumber", value = "证书编号")
private String certificationNumber;
@ApiModelProperty(name = "certificationName", value = "企业名称")
@CheckEmptyAnnotation(name = "企业名称")
private String certificationName;
@ApiModelProperty(name = "certificationType", value = "企业类型")
@CheckEmptyAnnotation(name = "企业类型")
private String certificationType;
@ApiModelProperty(name = "certificationAddress", value = "企业地址")
@CheckEmptyAnnotation(name = "企业地址")
private String certificationAddress;
@ApiModelProperty(name = "certificationLegalPerson", value = "企业法定代表人")
@CheckEmptyAnnotation(name = "企业法定代表人")
private String certificationLegalPerson;
@ApiModelProperty(name = "certificationCapital", value = "企业注册资本")
@CheckEmptyAnnotation(name = "企业注册资本")
private String certificationCapital;
@ApiModelProperty(name = "certificationFoundTime", value = "企业注册时间")
@CheckEmptyAnnotation(name = "企业注册时间")
private String certificationFoundTime;
@ApiModelProperty(name = "certificationLicenseTerm", value = "营业期限")
@CheckEmptyAnnotation(name = "营业期限")
private String certificationLicenseTerm;
@ApiModelProperty(name = "certificationBusiness", value = "企业经营范围")
@CheckEmptyAnnotation(name = "企业经营范围")
private String certificationBusiness;
@ApiModelProperty(name = "certificationAuthority", value = "登记机关")
@ApiModelProperty(name = "certificationCertificate", value = "企业授权书(新增字段)")
@CheckEmptyAnnotation(name = "企业授权书")
private String certificationCertificate;
@ApiModelProperty(name = "certificationNumber", value = "证书编号(该字段已取消)")
private String certificationNumber;
@ApiModelProperty(name = "certificationAuthority", value = "登记机关(该字段已取消)")
private String certificationAuthority;
@ApiModelProperty(name = "certificationComposition", value = "企业组成形式")
@ApiModelProperty(name = "certificationComposition", value = "企业组成形式(该字段已取消)")
private String certificationComposition;
@ApiModelProperty(name = "certificationImage", value = "营业执照照片")
private String certificationImage;
@ApiModelProperty(name = "shopId", value = "店铺ID")
private String shopId;
public String getCertificationCertificate() {
return certificationCertificate == null ? "" : certificationCertificate;
}
public void setCertificationCertificate(String certificationCertificate) {
this.certificationCertificate = certificationCertificate;
}
public String getCertificationId() {
return certificationId == null ? "" : certificationId.trim();

View File

@ -203,19 +203,22 @@ public class CardTemplateScansServiceImpl extends DefaultBaseService implements
}else{
scansDTO.setCardTemplateUseDTO(cardTemplateUseDTO);
// 封装人员ID, 用于批量查询人员的昵称和头像
userSet.add(scansDTO.getCreator());
userSet.add(cardTemplateUseDTO.getCreator());
}
}
// 查询出人员的信息
List<String> userList = new ArrayList<String>();
userList.addAll(userSet);
List<MiniappUserPO> miniappUserPOS = iMiniappUserService.listPO(userList);
List<MiniappUserPO> miniappUserPOS = new ArrayList<MiniappUserPO>();
if(userList.size() > 0) {
miniappUserPOS = iMiniappUserService.listPO(userList);
}
Map<String, MiniappUserPO> userPOMap = new HashMap<String, MiniappUserPO>();
for(MiniappUserPO userPO : miniappUserPOS) {
userPOMap.put(userPO.getUserId(), userPO);
}
for(CardTemplateScansDTO scansDTO : list) {
MiniappUserPO userPO = userPOMap.get(scansDTO.getCreator());
MiniappUserPO userPO = userPOMap.get(scansDTO.getCardTemplateUseDTO().getCreator());
if (userPO != null) {
/**
* 封装人员头像信息, 昵称信息
@ -243,6 +246,8 @@ public class CardTemplateScansServiceImpl extends DefaultBaseService implements
public SuccessResultList<List<CardTemplateScansDTO>> listPage(ListPage page) {
PageHelper.startPage(page.getPage(), page.getRows());
List<CardTemplateScansDTO> cardTemplateScansDTOs = list(page.getParams());
// 首页我看过谁 列表
if(1 == page.getPage() && page.getParams().get("homePage") != null && 1 == Integer.valueOf(page.getParams().get("homePage").toString())) {
// 为了让系统默认名片在最上面 , 把本页的系统默认名片先删除掉
Iterator<CardTemplateScansDTO> scansDTOIterator = cardTemplateScansDTOs.iterator();
while(scansDTOIterator.hasNext()) {
@ -262,6 +267,18 @@ public class CardTemplateScansServiceImpl extends DefaultBaseService implements
cardTemplateScansDTOs.add(0, scansDTO);
}
}
}else{
// 卡包浏览记录 我看过谁 列表
Iterator<CardTemplateScansDTO> scansDTOIterator = cardTemplateScansDTOs.iterator();
while(scansDTOIterator.hasNext()) {
CardTemplateScansDTO cardTemplateScansDTO = scansDTOIterator.next();
CardTemplateUseDTO useDTO = iCardTemplateUseService.get(cardTemplateScansDTO.getCardTemplateUseId());
// 海报的浏览记录不加载到浏览历史列表中
if("2".equals(useDTO.getTemplateMode())) {
scansDTOIterator.remove();
}
}
}
PageInfo<CardTemplateScansDTO> pageInfo = new PageInfo<>(cardTemplateScansDTOs);
return new SuccessResultList<>(cardTemplateScansDTOs, pageInfo.getPageNum(), pageInfo.getTotal());
// 加载系统默认名片在最上面
@ -306,7 +323,10 @@ public class CardTemplateScansServiceImpl extends DefaultBaseService implements
// 查询出人员的信息
List<String> userList = new ArrayList<String>();
userList.addAll(userSet);
List<MiniappUserPO> miniappUserPOS = iMiniappUserService.listPO(userList);
List<MiniappUserPO> miniappUserPOS = new ArrayList<MiniappUserPO>();
if(userList.size() > 0) {
miniappUserPOS = iMiniappUserService.listPO(userList);
}
Map<String, MiniappUserPO> userPOMap = new HashMap<String, MiniappUserPO>();
for(MiniappUserPO userPO : miniappUserPOS) {
userPOMap.put(userPO.getUserId(), userPO);

View File

@ -181,7 +181,7 @@ public class ShopServiceImpl extends DefaultBaseService implements IShopService
shopDTO.setIndustryName(industryName.deleteCharAt(industryName.length() - 1).toString());
shopDTO.setIndustryId(industryId.deleteCharAt(industryId.length() - 1).toString());
}
// 通过店铺ID获取店铺认证ID
// 通过店铺ID获取企业认证ID
ShopCertificationDTO shopCertificationDTO = shopCertificationDao.getByShopIdAndAuditStatus(params);
if(null != shopCertificationDTO) {
shopDTO.setShopCertificationId(shopCertificationDTO.getShopCertificationId());

View File

@ -0,0 +1,22 @@
package cn.com.tenlion.systemcard.service.shopauditlog;
import cn.com.tenlion.systemcard.pojo.vos.shopauditlog.ShopAuditLogVO;
/**
* @ClassName: IShopAuditLogService
* @Description:
* @Author: CodeFactory
* @Date: 2021-03-18 15:09:25
* @Version: 3.0
* 审核回调接口 , 所有需要审核的业务类 , 需要实现该接口来获取审核结果内容
**/
public interface IShopAuditLogUpdateService {
/**
* 更新审核状态
* @param shopAuditLogVO
* @return
*/
void updateStatus(ShopAuditLogVO shopAuditLogVO);
}

View File

@ -1,16 +1,19 @@
package cn.com.tenlion.systemcard.service.shopauditlog.impl;
import cn.com.tenlion.systemcard.dao.shopauditlog.IShopAuditLogDao;
import cn.com.tenlion.systemcard.filter.AuditServiceLocator;
import cn.com.tenlion.systemcard.pojo.bos.shopauditlog.ShopAuditLogBO;
import cn.com.tenlion.systemcard.pojo.dtos.shopauditlog.ShopAuditLogDTO;
import cn.com.tenlion.systemcard.pojo.pos.shopauditlog.ShopAuditLogPO;
import cn.com.tenlion.systemcard.pojo.vos.shopauditlog.ShopAuditLogVO;
import cn.com.tenlion.systemcard.service.shop.IShopService;
import cn.com.tenlion.systemcard.service.shopauditlog.IShopAuditLogService;
import cn.com.tenlion.systemcard.service.shopauditlog.IShopAuditLogUpdateService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import ink.wgink.common.base.DefaultBaseService;
import ink.wgink.common.component.SecurityComponent;
import ink.wgink.exceptions.SaveException;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.SuccessResultList;
import ink.wgink.util.UUIDUtil;
@ -19,7 +22,6 @@ import ink.wgink.util.map.HashMapUtil;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
@ -39,7 +41,8 @@ public class ShopAuditLogServiceImpl extends DefaultBaseService implements IShop
private SecurityComponent securityComponent;
@Autowired
private IShopService shopService;
@Autowired
private AuditServiceLocator auditServiceLocator;
@Override
public void save(ShopAuditLogVO shopAuditLogVO) {
@ -70,6 +73,14 @@ public class ShopAuditLogServiceImpl extends DefaultBaseService implements IShop
setAppSaveInfo(token, params);
}
shopAuditLogDao.save(params);
IShopAuditLogUpdateService service = auditServiceLocator.getService(shopAuditLogVO.getAuditType());
if(service == null) {
throw new SaveException("该审核类型实现类不存在");
}
service.updateStatus(shopAuditLogVO);
/**
* 更新对应表的审核状态
*/
return shopAuditId;
}

View File

@ -12,13 +12,18 @@ import java.util.Map;
/**
* @ClassName: IShopCertificationService
* @Description: 店铺认证
* @Description: 企业认证
* @Author: CodeFactory
* @Date: 2021-04-07 17:47:38
* @Version: 3.0
**/
public interface IShopCertificationService {
/**
* 查询信用代码
* @param certificationId
*/
ShopCertificationDTO getByCertificationId(String certificationId);
/**
* 更新认证审核状态
@ -28,7 +33,7 @@ public interface IShopCertificationService {
void updateAuditStatus(String shopCertificationId,String auditStatus);
/**
* 新增店铺认证
* 新增企业认证
*
* @param shopCertificationVO
* @return
@ -36,7 +41,7 @@ public interface IShopCertificationService {
void save(ShopCertificationVO shopCertificationVO);
/**
* 新增店铺认证
* 新增企业认证
*
* @param token
* @param shopCertificationVO
@ -45,7 +50,7 @@ public interface IShopCertificationService {
void save(String token, ShopCertificationVO shopCertificationVO);
/**
* 新增店铺认证
* 新增企业认证
*
* @param shopCertificationVO
* @return shopCertificationId
@ -53,7 +58,7 @@ public interface IShopCertificationService {
String saveReturnId(ShopCertificationVO shopCertificationVO);
/**
* 新增店铺认证
* 新增企业认证
*
* @param token
* @param shopCertificationVO
@ -62,7 +67,7 @@ public interface IShopCertificationService {
String saveReturnId(String token, ShopCertificationVO shopCertificationVO);
/**
* 删除店铺认证
* 删除企业认证
*
* @param ids id列表
* @return
@ -71,7 +76,7 @@ public interface IShopCertificationService {
/**
* 删除店铺认证
* 删除企业认证
*
* @param token
* @param ids id列表
@ -80,14 +85,14 @@ public interface IShopCertificationService {
void remove(String token, List<String> ids);
/**
* 删除店铺认证物理删除
* 删除企业认证物理删除
*
* @param ids id列表
*/
void delete(List<String> ids);
/**
* 修改店铺认证
* 修改企业认证
*
* @param shopCertificationId
* @param shopCertificationVO
@ -96,7 +101,7 @@ public interface IShopCertificationService {
void update(String shopCertificationId, ShopCertificationVO shopCertificationVO);
/**
* 修改店铺认证
* 修改企业认证
*
* @param token
* @param shopCertificationId
@ -106,7 +111,7 @@ public interface IShopCertificationService {
void update(String token, String shopCertificationId, ShopCertificationVO shopCertificationVO);
/**
* 店铺认证详情
* 企业认证详情
*
* @param params 参数Map
* @return
@ -114,7 +119,7 @@ public interface IShopCertificationService {
ShopCertificationDTO get(Map<String, Object> params);
/**
* 店铺认证详情
* 企业认证详情
*
* @param shopCertificationId
* @return
@ -122,7 +127,7 @@ public interface IShopCertificationService {
ShopCertificationDTO get(String shopCertificationId);
/**
* 店铺认证详情
* 企业认证详情
*
* @param params 参数Map
* @return
@ -130,7 +135,7 @@ public interface IShopCertificationService {
ShopCertificationBO getBO(Map<String, Object> params);
/**
* 店铺认证详情
* 企业认证详情
*
* @param shopCertificationId
* @return
@ -138,7 +143,7 @@ public interface IShopCertificationService {
ShopCertificationBO getBO(String shopCertificationId);
/**
* 店铺认证详情
* 企业认证详情
*
* @param params 参数Map
* @return
@ -146,7 +151,7 @@ public interface IShopCertificationService {
ShopCertificationPO getPO(Map<String, Object> params);
/**
* 店铺认证详情
* 企业认证详情
*
* @param shopCertificationId
* @return
@ -154,7 +159,7 @@ public interface IShopCertificationService {
ShopCertificationPO getPO(String shopCertificationId);
/**
* 店铺认证列表
* 企业认证列表
*
* @param params
* @return
@ -162,7 +167,7 @@ public interface IShopCertificationService {
List<ShopCertificationDTO> list(Map<String, Object> params);
/**
* 店铺认证列表
* 企业认证列表
*
* @param params
* @return
@ -170,7 +175,7 @@ public interface IShopCertificationService {
List<ShopCertificationBO> listBO(Map<String, Object> params);
/**
* 店铺认证列表
* 企业认证列表
*
* @param params
* @return
@ -178,7 +183,7 @@ public interface IShopCertificationService {
List<ShopCertificationPO> listPO(Map<String, Object> params);
/**
* 店铺认证分页列表
* 企业认证分页列表
*
* @param page
* @return
@ -186,7 +191,7 @@ public interface IShopCertificationService {
SuccessResultList<List<ShopCertificationDTO>> listPage(ListPage page);
/**
* 店铺认证统计
* 企业认证统计
*
* @param params
* @return

View File

@ -6,14 +6,21 @@ import cn.com.tenlion.systemcard.pojo.bos.shopcertification.ShopCertificationBO;
import cn.com.tenlion.systemcard.pojo.dtos.shopauditlog.ShopAuditLogDTO;
import cn.com.tenlion.systemcard.pojo.dtos.shopcertification.ShopCertificationDTO;
import cn.com.tenlion.systemcard.pojo.pos.shopcertification.ShopCertificationPO;
import cn.com.tenlion.systemcard.pojo.vos.shopauditlog.ShopAuditLogVO;
import cn.com.tenlion.systemcard.pojo.vos.shopcertification.ShopCertificationVO;
import cn.com.tenlion.systemcard.service.shop.IShopService;
import cn.com.tenlion.systemcard.service.shopauditlog.IShopAuditLogUpdateService;
import cn.com.tenlion.systemcard.service.shopcertification.IShopCertificationService;
import cn.com.tenlion.systemcard.util.BusinessLicenseCheckUtil;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import ink.wgink.common.base.DefaultBaseService;
import ink.wgink.exceptions.ParamsException;
import ink.wgink.exceptions.SaveException;
import ink.wgink.module.file.service.IFileService;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.app.AppTokenUser;
import ink.wgink.pojo.bos.UserInfoBO;
import ink.wgink.pojo.result.SuccessResultList;
import ink.wgink.util.UUIDUtil;
import ink.wgink.util.map.HashMapUtil;
@ -27,43 +34,46 @@ import java.util.Map;
/**
* @ClassName: ShopCertificationServiceImpl
* @Description: 店铺认证
* @Description: 企业认证
* @Author: CodeFactory
* @Date: 2021-04-07 17:47:38
* @Version: 3.0
**/
@Service
public class ShopCertificationServiceImpl extends DefaultBaseService implements IShopCertificationService {
public class ShopCertificationServiceImpl extends DefaultBaseService implements IShopCertificationService , IShopAuditLogUpdateService {
@Autowired
private IShopCertificationDao shopCertificationDao;
@Autowired
private IShopService shopService;
@Autowired
private IShopAuditLogDao shopAuditLogDao;
@Override
public void updateStatus(ShopAuditLogVO shopAuditLogVO) {
updateAuditStatus(shopAuditLogVO.getAuditBId(), shopAuditLogVO.getAuditStatus() + "");
}
@Override
public ShopCertificationDTO getByCertificationId(String certificationId) {
return shopCertificationDao.getByCertificationId(certificationId);
}
@Override
public void updateAuditStatus(String shopCertificationId,String auditStatus) {
ShopCertificationDTO shopCertificationDTO = this.get(shopCertificationId);
if(shopCertificationDTO == null){
throw new ParamsException("该内容不存在");
}
Map<String, Object> params = new HashMap<String, Object>();
params.put("shopCertificationId", shopCertificationId);
params.put("auditStatus", auditStatus);
setUpdateInfo(params);
shopCertificationDao.update(params);
ShopCertificationDTO shopCertificationDTO = this.get(shopCertificationId);
if(shopCertificationDTO == null){
throw new ParamsException("系统异常");
// 审核通过更新企业认证状态 2021年9月22日17:05:45 逻辑改为了先有企业认证, 再有店铺.
// if(shopCertificationDTO.getAuditStatus() == 1){
// shopService.updateIsCertification(shopCertificationDTO.getShopId());
// }
}
//审核通过更新店铺认证状态
if(shopCertificationDTO.getAuditStatus() == 1){
shopService.updateIsCertification(shopCertificationDTO.getShopId());
}
}
@Override
public void save(ShopCertificationVO shopCertificationVO) {
@ -80,18 +90,52 @@ public class ShopCertificationServiceImpl extends DefaultBaseService implements
return saveReturnId(null, shopCertificationVO);
}
private String getUserId(String token) {
String userId = "notUserId";
if (StringUtils.isBlank(token)) {
UserInfoBO userInfoBO = this.securityComponent.getCurrentUser();
userId = userInfoBO.getUserId();
} else {
AppTokenUser appTokenUser = this.getAppTokenUser(token);
userId = appTokenUser.getId();
}
return userId;
}
@Override
public String saveReturnId(String token, ShopCertificationVO shopCertificationVO) {
Map<String, Object> params1 = new HashMap<String, Object>();
params1.put("shopId",shopCertificationVO.getShopId());
ShopCertificationDTO sdtot = shopCertificationDao.getByShopIdAndAuditStatus(params1);
if(sdtot != null){
throw new ParamsException("该店铺已经提交过认证,请勿重复提交");
String userId = getUserId(token);
/**
* 通过统一信用代码查询是否已经存在, 如果存在则不允许再新增
*/
shopCertificationVO.setCertificationId(shopCertificationVO.getCertificationId().trim());
boolean checkResult = false;
try {
checkResult = BusinessLicenseCheckUtil.validateUnifiedCreditCode(shopCertificationVO.getCertificationId());
}catch(Exception e) {
throw new SaveException("统一信用代码错误");
}
if(!checkResult) {
throw new SaveException("统一信用代码错误");
}
ShopCertificationDTO shopCertificationDTO = getByCertificationId(shopCertificationVO.getCertificationId());
if (shopCertificationDTO != null) {
throw new SaveException("该企业认证已存在");
}
// 是将该userId作为企业认证ID来存储的, 这样可以避免一个人认证多个的情况出现
ShopCertificationDTO shopCertificationUserDTO = get(getUserId(token));
if (shopCertificationUserDTO != null) {
throw new SaveException("您已认证过企业");
}
// params1.put("shopId",shopCertificationVO.getShopId());
// ShopCertificationDTO sdtot = shopCertificationDao.getByShopIdAndAuditStatus(params1);
// if(sdtot != null){
// throw new ParamsException("该店铺已经提交过认证,请勿重复提交");
// }
String shopCertificationId = UUIDUtil.getUUID();
Map<String, Object> params = HashMapUtil.beanToMap(shopCertificationVO);
params.put("shopCertificationId", shopCertificationId);
params.put("auditStatus", 0);
params.put("shopCertificationId", userId);
params.put("auditStatus", 0);// 待审核
if (StringUtils.isBlank(token)) {
setSaveInfo(params);
} else {

View File

@ -1,6 +1,7 @@
package cn.com.tenlion.systemcard.socket;
import ink.wgink.util.UUIDUtil;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Component;
import org.springframework.web.socket.TextMessage;
import org.springframework.web.socket.WebSocketSession;
@ -26,6 +27,8 @@ public class CardLogSocket {
public static Boolean exceptionDescription = false;
public static String listenerPath = "(app/)";
@OnOpen
public void onOpen(Session session) {
System.out.println("链接成功......");
@ -65,6 +68,15 @@ public class CardLogSocket {
if(message.contains("exceptionDescription")) {
exceptionDescription = Boolean.parseBoolean(message.split("=")[1]);
}
if(message.contains("listenerPath")) {
String listener = message.split("=")[1];
if(StringUtils.isEmpty(listener)) {
listenerPath = "(app/)";
}else {
listenerPath = listener;
}
}
}
/**

View File

@ -28,6 +28,12 @@ public class HttpUtil {
private static Logger logger = Logger.getLogger(HttpUtil.class);
public static void main(String[] args) {
if("/api/configcolumn/listpage".matches(".*((/api/)|(path)).*")){
System.out.println("true");
}
}
/**
* Post请求
* @Description: TODO

View File

@ -258,7 +258,7 @@
</select>
<!-- 列表 -->
<select id="list" parameterType="map" resultMap="accountDTO" useCache="true">
<select id="list" parameterType="map" resultMap="accountDTO">
SELECT
t1.account_id,
t1.account_money,

View File

@ -437,7 +437,7 @@
</select>
<!-- CBC名片收费记录表列表 -->
<select id="list" parameterType="map" resultMap="cardChargeDTO" useCache="true">
<select id="list" parameterType="map" resultMap="cardChargeDTO">
SELECT
t1.card_charge_id,
t1.card_charge_price,

View File

@ -459,7 +459,7 @@
</select>
<!-- 列表 -->
<select id="list" parameterType="map" resultMap="cardTemplateUseDTO" useCache="true">
<select id="list" parameterType="map" resultMap="cardTemplateUseDTO">
SELECT
t1.card_template_use_id,
t1.picture_template_id,

View File

@ -168,6 +168,8 @@
t1.id LIKE CONCAT('%', #{keywords}, '%')
)
</if>
ORDER BY
t1.audit_date DESC
</select>
<!-- 列表 -->

View File

@ -72,7 +72,7 @@
<result column="is_delete" property="isDelete"/>
</resultMap>
<!-- 新增店铺认证 -->
<!-- 新增企业认证 -->
<insert id="save" parameterType="map">
INSERT INTO svc_shop_certification(
shop_certification_id,
@ -123,7 +123,7 @@
)
</insert>
<!-- 删除店铺认证 -->
<!-- 删除企业认证 -->
<update id="remove" parameterType="map">
UPDATE
svc_shop_certification
@ -138,7 +138,7 @@
</foreach>
</update>
<!-- 删除店铺认证(物理) -->
<!-- 删除企业认证(物理) -->
<update id="delete" parameterType="map">
DELETE FROM
svc_shop_certification
@ -149,7 +149,7 @@
</foreach>
</update>
<!-- 修改店铺认证 -->
<!-- 修改企业认证 -->
<update id="update" parameterType="map">
UPDATE
svc_shop_certification
@ -208,7 +208,33 @@
shop_certification_id = #{shopCertificationId}
</update>
<!-- 店铺认证详情 -->
<!-- 企业认证详情 -->
<select id="getByCertificationId" parameterType="map" resultMap="shopCertificationDTO">
SELECT
t1.certification_id,
t1.shop_id,
t1.certification_number,
t1.certification_name,
t1.certification_type,
t1.certification_address,
t1.certification_legal_person,
t1.certification_capital,
t1.certification_found_time,
t1.certification_license_term,
t1.certification_business,
t1.certification_authority,
t1.certification_composition,
t1.certification_image,
t1.audit_status,
t1.shop_certification_id,
t1.certification_certificate
FROM
svc_shop_certification t1
WHERE
t1.is_delete = 0 AND t1.certification_id = #{certificationId}
</select>
<!-- 企业认证详情 -->
<select id="get" parameterType="map" resultMap="shopCertificationDTO">
SELECT
t1.certification_id,
@ -227,12 +253,9 @@
t1.certification_image,
t1.audit_status,
t1.shop_certification_id,
t2.shop_name,
t1.certification_certificate
FROM
svc_shop_certification t1
LEFT JOIN svc_shop t2
ON t1.shop_id = t2.shop_id
WHERE
t1.is_delete = 0
<if test="shopCertificationId != null and shopCertificationId != ''">
@ -241,7 +264,7 @@
</if>
</select>
<!-- 店铺认证详情 -->
<!-- 企业认证详情 -->
<select id="getBO" parameterType="map" resultMap="shopCertificationBO">
SELECT
t1.shop_certification_id,
@ -275,7 +298,7 @@
</if>
</select>
<!-- 店铺认证详情 -->
<!-- 企业认证详情 -->
<select id="getPO" parameterType="map" resultMap="shopCertificationPO">
SELECT
t1.shop_certification_id,
@ -309,7 +332,7 @@
</if>
</select>
<!-- 店铺认证列表 -->
<!-- 企业认证列表 -->
<select id="list" parameterType="map" resultMap="shopCertificationDTO">
SELECT
t1.shop_certification_id,
@ -329,22 +352,20 @@
t1.certification_image,
t1.audit_status,
t1.gmt_create,
t2.shop_name,
t1.certification_certificate
FROM
svc_shop_certification t1
LEFT JOIN
svc_shop t2
ON
t1.shop_id = t2.shop_id
WHERE
t1.is_delete = 0
<if test="keywords != null and keywords != ''">
AND (
<!-- 这里添加其他条件 -->
t2.shop_name LIKE CONCAT('%', #{keywords}, '%')
OR
t1.certification_name LIKE CONCAT('%', #{keywords}, '%')
OR
t1.certification_address LIKE CONCAT('%', #{keywords}, '%')
OR
t1.certification_number LIKE CONCAT('%', #{keywords}, '%')
OR
t1.certification_legal_person LIKE CONCAT('%', #{keywords}, '%')
)
</if>
<if test="startTime != null and startTime != ''">
@ -368,7 +389,7 @@
ORDER BY t1.gmt_create DESC
</select>
<!-- 店铺认证列表 -->
<!-- 企业认证列表 -->
<select id="listBO" parameterType="map" resultMap="shopCertificationBO">
SELECT
t1.shop_certification_id,
@ -419,7 +440,7 @@
</if>
</select>
<!-- 店铺认证列表 -->
<!-- 企业认证列表 -->
<select id="listPO" parameterType="map" resultMap="shopCertificationPO">
SELECT
t1.shop_certification_id,
@ -470,7 +491,7 @@
</if>
</select>
<!-- 店铺认证统计 -->
<!-- 企业认证统计 -->
<select id="count" parameterType="map" resultType="Integer">
SELECT
COUNT(*)
@ -480,7 +501,6 @@
t1.is_delete = 0
</select>
<select id="getByShopIdAndAuditStatus" parameterType="map" resultMap="shopCertificationDTO">
SELECT
t1.*
@ -490,4 +510,5 @@
/*(t1.audit_status = 0 OR t1.audit_status = 1) AND */
t1.is_delete = 0 AND t1.shop_id = #{shopId}
</select>
</mapper>

View File

@ -491,6 +491,10 @@
function lineChange(id, height, width, left, top) {
$('.line').show();
var newHeight = Math.round(height);
var newWidth = Math.round(width);
var newLeft = Math.round(left);
var newTop = Math.round(top);
$('.line-t').css({'borderColor': '#FFF'});
$('.line-l').css({'borderColor': '#FFF'});
$('.line-r').css({'borderColor': '#FFF'});
@ -499,24 +503,24 @@
$('.line-l').css({'left': left})
$('.line-r').css({'left': (left + width) + 'px'})
$('.line-b').css({'top': (top + height) + 'px'})
var bottom = top + height;
var right = left + width;
var bottom = newTop + newHeight;
var right = newLeft + newWidth;
// 判断哪个div的边线, 与当前的8条边线相交汇
var boxArray = $(".box");
for(var i = 0; i < boxArray.length; i++) {
var box = boxArray[i]
did = $(box).attr("id");
w = $(box).width();
h = $(box).height();
x = $(box).css("left");
y = $(box).css("top");
x = Number(x.replace('px',''));
y = Number(y.replace('px',''));
w = Math.round($(box).width());
h = Math.round($(box).height());
x = Math.round($(box).css("left"));
y = Math.round($(box).css("top"));
x = Math.round(Number(x.replace('px','')));
y = Math.round(Number(y.replace('px','')));
r = x + w;
b = y + h;
if(id != did) {
// 谁与当前上边重合
if(top == y || top == b) {
if(newTop == y || newTop == b) {
$('.line-t').css({'borderColor': 'red'});
}
// 谁与当前下边重合
@ -524,7 +528,7 @@
$('.line-b').css({'borderColor': 'red'});
}
// 谁与当前左线重合
if(left == x || left == r) {
if(newLeft == x || newLeft == r) {
$('.line-l').css({'borderColor': 'red'});
}
// 谁与当前右线重合

View File

@ -81,12 +81,8 @@
top.dialog.close(index);
var loadLayerIndex;
top.restAjax.post(top.restAjax.path('api/shopauditlog/save', []), formData.field, null, function(code, data) {
var auditType = formData.field['auditType'];
var auditBId = formData.field['auditBId'];
var auditStatus = formData.field['auditStatus'];
if(auditType == 1){
auditType1(auditBId,auditStatus)
}
top.dialog.close(index);
closeBox();
}, function(code, data) {
top.dialog.msg(data.msg);
}, function() {
@ -98,29 +94,6 @@
return false;
});
function auditType1(shopCertificationId,auditStatus){
var loadLayerIndex;
top.restAjax.put(top.restAjax.path('api/shopcertification/updateAuditStatus/{shopCertificationId}/{auditStatus}', [shopCertificationId,auditStatus]), null, null, function(code, data) {
var layerIndex = top.dialog.msg("提交成功!", {
time: 0,
btn: [top.dataMessage.button.yes],
shade: 0.3,
yes: function(index) {
top.dialog.close(index);
closeBox();
}
});
}, function(code, data) {
top.dialog.msg(data.msg);
}, function() {
loadLayerIndex = top.dialog.msg(top.dataMessage.committing, {icon: 16, time: 0, shade: 0.3});
}, function() {
top.dialog.close(loadLayerIndex);
});
}
$('.close').on('click', function() {
closeBox();
});

View File

@ -82,7 +82,7 @@
[
{type:'checkbox', fixed: 'left'},
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
{field: 'certificationImage', width: 180, title: '营业执照', align:'center',
{field: 'certificationImage', width: 120, title: '营业执照', align:'center',
templet: function(row) {
var rowData = row[this.field];
var value='<div id="imgShow'+row.shopId+'"><img style="height: 30px;width: 30px;" src="route/file/download/true/'+rowData+'"></div>';
@ -92,7 +92,16 @@
return value;
}
},
{field: 'shopName', width: 180, title: '关联店铺', align:'center',
// {field: 'shopName', width: 180, title: '关联店铺', align:'center',
// templet: function(row) {
// var rowData = row[this.field];
// if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
// return '-';
// }
// return rowData;
// }
// },
{field: 'certificationName', width: 200, title: '企业名称', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
@ -101,7 +110,7 @@
return rowData;
}
},
{field: 'certificationName', width: 180, title: '企业名称', align:'center',
{field: 'certificationLegalPerson', width: 150, title: '企业法定代表人', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
@ -110,7 +119,7 @@
return rowData;
}
},
{field: 'certificationId', width: 180, title: '统一信用代码', align:'center',
{field: 'certificationId', width: 200, title: '统一信用代码', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
@ -120,16 +129,7 @@
}
},
{field: 'certificationType', width: 180, title: '企业类型', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'certificationLegalPerson', width: 180, title: '企业法定代表人', align:'center',
{field: 'certificationType', width: 250, title: '企业类型', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
@ -156,17 +156,15 @@
return rowData;
}
},
{field: 'auditStatus', width: 180, title: '审核状态', align:'center',fixed: 'right',
{field: 'auditStatus', width: 100, title: '审核状态', align:'center',fixed: 'right',
templet: function(row) {
var rowData = row[this.field];
if (rowData === 0){
return "未审核"
}
if (rowData === 1){
return "审核通过";
}
if (rowData === -1){
return "不通过";
if(rowData == 0) {
return '<button type="button" class="layui-btn layui-btn-xs layui-bg-blue">未审核</button>';
}else if(rowData == 1) {
return '<button type="button" class="layui-btn layui-btn-xs">审核通过</button>';
}else{
return '<button type="button" class="layui-btn layui-btn-danger layui-btn-xs">不通过</button>';
}
return rowData;
}
@ -174,11 +172,13 @@
{field:'cz', width:220, title: '操作', align:'center', fixed: 'right',
templet: function(row) {
var rowData = '<div class="layui-btn-group">'
+'<button type="button" class="layui-btn layui-btn-xs" lay-event="show">详情</button>'
+'<button type="button" class="layui-btn layui-btn-xs" lay-event="shop">店铺</button>'
if(row['auditStatus'] === 0){
rowData += '<button type="button" class="layui-btn layui-btn-danger layui-btn-xs" lay-event="audit">审核</button>'
+'<button type="button" class="layui-btn layui-btn-xs" lay-event="show">企业详情</button>';
if(row['shopId']){
rowData += '<button type="button" class="layui-btn layui-btn-xs" lay-event="shop">企业店铺</button>';
}
// if(row['auditStatus'] === 0){
// rowData += '<button type="button" class="layui-btn layui-btn-danger layui-btn-xs" lay-event="audit">审核</button>'
// }
rowData += '<button type="button" class="layui-btn layui-btn-normal layui-btn-xs" lay-event="auditHistory">审核记录</button>'
rowData += '</div>';
return rowData;

View File

@ -21,7 +21,7 @@
<div class="layui-card-header">
<span class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
<a class="close" href="javascript:void(0);">上级列表</a><span lay-separator="">/</span>
<a href="javascript:void(0);"><cite>编辑内容</cite></a>
<a href="javascript:void(0);"><cite>查看内容</cite></a>
</span>
</div>
<div class="layui-card-body" style="padding: 15px;">
@ -37,25 +37,25 @@
</div>
</div>
</div>
<div class="layui-form-item">
<div class="layui-form-item" style="display: none" id="showShop">
<label class="layui-form-label">关联店铺</label>
<div class="layui-input-block">
<input type="text" id="shopName" name="shopName" class="layui-input" value="" maxlength="500" readonly="readonly">
</div>
</div>
<div class="layui-form-item layui-col-space10">
<div class="layui-col-md6">
<div class="layui-col-md12">
<label class="layui-form-label">统一信用代码</label>
<div class="layui-input-block">
<input type="text" id="certificationId" name="certificationId" class="layui-input" value="" placeholder="请输入统一信用代码" maxlength="100" readonly="readonly">
</div>
</div>
<div class="layui-col-md6">
<label class="layui-form-label">证书编号</label>
<div class="layui-input-block">
<input type="text" id="certificationNumber" name="certificationNumber" class="layui-input" value="" placeholder="请输入证书编号" maxlength="100" readonly="readonly">
</div>
</div>
<!-- <div class="layui-col-md6">-->
<!-- <label class="layui-form-label">证书编号</label>-->
<!-- <div class="layui-input-block">-->
<!-- <input type="text" id="certificationNumber" name="certificationNumber" class="layui-input" value="" placeholder="请输入证书编号" maxlength="100" readonly="readonly">-->
<!-- </div>-->
<!-- </div>-->
</div>
<div class="layui-form-item layui-col-space10">
<div class="layui-col-md6">
@ -105,18 +105,18 @@
<input type="text" id="certificationAddress" name="certificationAddress" class="layui-input" value="" placeholder="请输入企业地址" maxlength="500" readonly="readonly">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">登记机关</label>
<div class="layui-input-block">
<input type="text" id="certificationAuthority" name="certificationAuthority" class="layui-input" value="" placeholder="请输入登记机关" maxlength="500" readonly="readonly">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">企业组成形式</label>
<div class="layui-input-block">
<input type="text" id="certificationComposition" name="certificationComposition" class="layui-input" value="" placeholder="请输入企业组成形式" maxlength="255" readonly="readonly">
</div>
</div>
<!-- <div class="layui-form-item">-->
<!-- <label class="layui-form-label">登记机关</label>-->
<!-- <div class="layui-input-block">-->
<!-- <input type="text" id="certificationAuthority" name="certificationAuthority" class="layui-input" value="" placeholder="请输入登记机关" maxlength="500" readonly="readonly">-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="layui-form-item">-->
<!-- <label class="layui-form-label">企业组成形式</label>-->
<!-- <div class="layui-input-block">-->
<!-- <input type="text" id="certificationComposition" name="certificationComposition" class="layui-input" value="" placeholder="请输入企业组成形式" maxlength="255" readonly="readonly">-->
<!-- </div>-->
<!-- </div>-->
<div class="layui-form-item layui-form-text">
<label class="layui-form-label">企业经营范围</label>
<div class="layui-input-block">
@ -126,6 +126,7 @@
<div class="layui-form-item layui-layout-admin">
<div class="layui-input-block">
<div class="layui-footer" style="left: 0;">
<button type="button" class="layui-btn layui-btn-success auditlogSave" style="display: none">审核企业认证</button>
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
</div>
</div>
@ -154,9 +155,6 @@
var wangEditorObj = {};
var viewerObj = {};
var view = new Viewer(document.getElementById("imageview"),{});
function closeBox() {
parent.layer.close(parent.layer.getFrameIndex(window.name));
}
@ -170,10 +168,24 @@
});
}
$('.auditlogSave').on('click', function() {
auditlogSave();
});
function auditlogSave() {
layer.open({
type: 2,
title: false,
closeBtn: 0,
area: ['70%', '50%'],
shadeClose: true,
anim: 2,
content: top.restAjax.path('route/shopauditlog/audit.html?auditType=shopCertificationServiceImpl&bId={shopCertificationId}', [shopCertificationId]),
end: function() {
window.location.reload();
}
});
}
// 初始化内容
function initData() {
@ -183,7 +195,16 @@
for(var i in data) {
dataFormData[i] = data[i] +'';
}
if(data.auditStatus == 0) {
$(".auditlogSave").show();
}
if(data.certificationImage) {
$("#showImg").attr("src","route/file/download/true/"+data.certificationImage);
var view = new Viewer(document.getElementById("imageview"),{});
}
if(data.shopId) {
$("#showShop").show();
}
form.val('dataForm', dataFormData);
form.render(null, 'dataForm');
}, function(code, data) {

View File

@ -59,8 +59,10 @@
<a class="btn btn-big btn-primary" id="query">内容查询</a>
<a class="btn btn-big btn-success" id="replaceAll">内容替换</a>
<a class="btn btn-big btn-danger" id="jumpNumber">指定行跳转</a>
<label class="layui-form-label">打印异常详情</label>
<label class="layui-form-label">打印异常</label>
<input type="checkbox" style="height:15px;width:15px;" id="exceptionDescription">
<label class="layui-form-label">拦截路径</label>
<input type="text" id="listenerPath" class="layui-input" value="" placeholder="请输入拦截路径 示例:(app/)|(api/)" lay-verify="required">
<span class="btn btn-big btn-warm" id="copyData" >选中文字内容 CTRL + K【下一个】 | ALT + SHIF + K【上一个】</span>
</td>
</tr>
@ -127,6 +129,7 @@
}
});
$("#listenerPath").val("[[${listenerPath}]]");
var socket;
if(typeof(WebSocket) == "undefined") {
console.log("您的浏览器不支持WebSocket");
@ -163,6 +166,11 @@
}
}
$('#listenerPath').on('input', function(){
var listenerPath = $(this).val();
socket.send("listenerPath=" + listenerPath);
});
$(document).on('click','#selectUser',function(){
// route/cardconsole/appuser route/department/user/select-user
var index = top.dialog.open({