扫码功能

This commit is contained in:
ly19960718 2021-04-08 17:11:04 +08:00
parent 3482f06a32
commit e4888b4a93
33 changed files with 3446 additions and 50 deletions

View File

@ -0,0 +1,111 @@
package cn.com.tenlion.controller.api.shopcertification;
import ink.wgink.annotation.CheckRequestBodyAnnotation;
import ink.wgink.common.base.DefaultBaseController;
import ink.wgink.interfaces.consts.ISystemConstant;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.ErrorResult;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultData;
import ink.wgink.pojo.result.SuccessResultList;
import cn.com.tenlion.pojo.dtos.shopcertification.ShopCertificationDTO;
import cn.com.tenlion.pojo.vos.shopcertification.ShopCertificationVO;
import cn.com.tenlion.service.shopcertification.IShopCertificationService;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* @ClassName: ShopCertificationController
* @Description: 店铺认证
* @Author: CodeFactory
* @Date: 2021-04-07 17:47:38
* @Version: 3.0
**/
@Api(tags = ISystemConstant.API_TAGS_SYSTEM_PREFIX + "店铺认证接口")
@RestController
@RequestMapping(ISystemConstant.API_PREFIX + "/shopcertification")
public class ShopCertificationController extends DefaultBaseController {
@Autowired
private IShopCertificationService shopCertificationService;
@ApiOperation(value = "新增店铺认证", notes = "新增店铺认证接口")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PostMapping("save")
@CheckRequestBodyAnnotation
public SuccessResult save(@RequestBody ShopCertificationVO shopCertificationVO) {
shopCertificationService.save(shopCertificationVO);
return new SuccessResult();
}
@ApiOperation(value = "删除店铺认证", notes = "删除店铺认证接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "ids", value = "ID列表用下划线分隔", paramType = "path", example = "1_2_3")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@DeleteMapping("remove/{ids}")
public SuccessResult remove(@PathVariable("ids") String ids) {
shopCertificationService.remove(Arrays.asList(ids.split("\\_")));
return new SuccessResult();
}
@ApiOperation(value = "修改店铺认证", notes = "修改店铺认证接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "shopCertificationId", value = "店铺认证ID", paramType = "path")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PutMapping("update/{shopCertificationId}")
@CheckRequestBodyAnnotation
public SuccessResult update(@PathVariable("shopCertificationId") String shopCertificationId, @RequestBody ShopCertificationVO shopCertificationVO) {
shopCertificationService.update(shopCertificationId, shopCertificationVO);
return new SuccessResult();
}
@ApiOperation(value = "店铺认证详情", notes = "店铺认证详情接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "shopCertificationId", value = "店铺认证ID", paramType = "path")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("get/{shopCertificationId}")
public ShopCertificationDTO get(@PathVariable("shopCertificationId") String shopCertificationId) {
return shopCertificationService.get(shopCertificationId);
}
@ApiOperation(value = "店铺认证列表", notes = "店铺认证列表接口")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("list")
public List<ShopCertificationDTO> list() {
Map<String, Object> params = requestParams();
return shopCertificationService.list(params);
}
@ApiOperation(value = "店铺认证分页列表", notes = "店铺认证分页列表接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"),
@ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"),
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("listpage")
public SuccessResultList<List<ShopCertificationDTO>> listPage(ListPage page) {
Map<String, Object> params = requestParams();
page.setParams(params);
return shopCertificationService.listPage(page);
}
@ApiOperation(value = "店铺认证统计", notes = "店铺认证统计接口")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("count")
SuccessResultData<Integer> count() {
Map<String, Object> params = requestParams();
return new SuccessResultData<>(shopCertificationService.count(params));
}
}

View File

@ -3,9 +3,11 @@ package cn.com.tenlion.controller.app.apis.shop;
import cn.com.tenlion.pojo.dtos.shop.ShopDTO;
import cn.com.tenlion.pojo.vos.shop.ShopVO;
import cn.com.tenlion.service.shop.IShopService;
import cn.com.tenlion.util.QRCodeUtil;
import ink.wgink.annotation.CheckRequestBodyAnnotation;
import ink.wgink.app.AppTokenManager;
import ink.wgink.common.base.DefaultBaseController;
import ink.wgink.exceptions.ParamsException;
import ink.wgink.interfaces.consts.ISystemConstant;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.app.AppTokenUser;
@ -15,6 +17,8 @@ import ink.wgink.pojo.result.SuccessResultData;
import ink.wgink.pojo.result.SuccessResultList;
import io.swagger.annotations.*;
import org.apache.commons.lang3.StringUtils;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -38,6 +42,39 @@ public class ShopAppController extends DefaultBaseController {
private IShopService shopService;
@ApiOperation(value = "获取店铺二维码", notes = "获取店铺二维码接口")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
@ApiImplicitParam(name = "shopId", value = "店铺ID", paramType = "path"),
@ApiImplicitParam(name = "type", value = "1员工 2会员", paramType = "path")
})
@GetMapping("getshopcode/{shopId}/{type}")
public SuccessResultData getShopCode(@RequestHeader("token") String token,@PathVariable("shopId") String shopId,@PathVariable("type") String type) throws Exception{
JSONObject json = new JSONObject();
String fileId = "";
if("1".equals(type)){
json.put("url","app/shopstaff/save/"+shopId);
json.put("type","1");
fileId = QRCodeUtil.deStyle1(AppTokenManager.getInstance().getToken(token).getAppTokenUser().getId(),json.toString());
}
if("2".equals(type)){
json.put("url","app/shopmember/save/"+shopId);
json.put("type","2");
fileId = QRCodeUtil.deStyle1(AppTokenManager.getInstance().getToken(token).getAppTokenUser().getId(),json.toString());
}
if(StringUtils.isBlank(fileId)){
throw new ParamsException("获取失败");
}
return new SuccessResultData(fileId);
}
@ApiOperation(value = "我的店铺分页列表", notes = "我的店铺分页列表接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"),

View File

@ -0,0 +1,152 @@
package cn.com.tenlion.controller.app.apis.shopcertification;
import cn.com.tenlion.util.BusinessLicenseBean;
import cn.com.tenlion.util.OCRBusinessLicenseUtil;
import ink.wgink.annotation.CheckRequestBodyAnnotation;
import ink.wgink.common.base.DefaultBaseController;
import ink.wgink.exceptions.ParamsException;
import ink.wgink.interfaces.consts.ISystemConstant;
import ink.wgink.module.file.service.IFileService;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.pos.FilePO;
import ink.wgink.pojo.result.ErrorResult;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultData;
import ink.wgink.pojo.result.SuccessResultList;
import cn.com.tenlion.pojo.dtos.shopcertification.ShopCertificationDTO;
import cn.com.tenlion.pojo.vos.shopcertification.ShopCertificationVO;
import cn.com.tenlion.service.shopcertification.IShopCertificationService;
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.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @ClassName: ShopCertificationAppController
* @Description: 店铺认证
* @Author: CodeFactory
* @Date: 2021-04-07 17:47:38
* @Version: 3.0
**/
@Api(tags = ISystemConstant.API_TAGS_APP_PREFIX + "店铺认证接口")
@RestController
@RequestMapping(ISystemConstant.APP_PREFIX + "/shopcertification")
public class ShopCertificationAppController extends DefaultBaseController {
@Autowired
private IShopCertificationService shopCertificationService;
@Autowired
private IFileService fileService;
@ApiOperation(value = "营业执照OCR识别", notes = "营业执照OCR识别接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
@ApiImplicitParam(name = "id", value = "ID列表用下划线分隔", paramType = "path", example = "1_2_3")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("businessLicenseOCR/{id}")
public BusinessLicenseBean businessLicenseOCR(@RequestHeader("token") String token,@PathVariable("id") String id){
Map<String,Object> params = new HashMap<String, Object>();
params.put("fileId",id);
FilePO filePO = fileService.getPO(params);
if (filePO == null){
throw new ParamsException("未获取到营业执照");
}
if (StringUtils.isBlank(filePO.getFilePath())){
throw new ParamsException("未获取到营业执照");
}
return OCRBusinessLicenseUtil.businessLicenseFile(filePO.getFilePath());
}
@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) {
shopCertificationService.save(token, shopCertificationVO);
return new SuccessResult();
}
@ApiOperation(value = "删除店铺认证(id列表)", notes = "删除店铺认证(id列表)接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
@ApiImplicitParam(name = "ids", value = "ID列表用下划线分隔", paramType = "path", example = "1_2_3")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@DeleteMapping("remove/{ids}")
public SuccessResult remove(@RequestHeader("token") String token, @PathVariable("ids") String ids) {
shopCertificationService.remove(token, Arrays.asList(ids.split("\\_")));
return new SuccessResult();
}
@ApiOperation(value = "修改店铺认证", notes = "修改店铺认证接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
@ApiImplicitParam(name = "shopCertificationId", value = "店铺认证ID", paramType = "path")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PutMapping("updateshopcertification/{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)接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
@ApiImplicitParam(name = "shopCertificationId", value = "店铺认证ID", paramType = "path")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("get/{shopCertificationId}")
public ShopCertificationDTO get(@RequestHeader("token") String token, @PathVariable("shopCertificationId") String shopCertificationId) {
return shopCertificationService.get(shopCertificationId);
}
@ApiOperation(value = "店铺认证列表", notes = "店铺认证列表接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("list")
public List<ShopCertificationDTO> list(@RequestHeader("token") String token) {
Map<String, Object> params = requestParams();
return shopCertificationService.list(params);
}
@ApiOperation(value = "店铺认证分页列表", notes = "店铺认证分页列表接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"),
@ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"),
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("listpageshopcertification")
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 = "店铺认证统计接口")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("count")
SuccessResultData<Integer> count() {
Map<String, Object> params = requestParams();
return new SuccessResultData<>(shopCertificationService.count(params));
}
}

View File

@ -1,6 +1,7 @@
package cn.com.tenlion.controller.app.api.shopmember;
import ink.wgink.annotation.CheckRequestBodyAnnotation;
import ink.wgink.app.AppTokenManager;
import ink.wgink.common.base.DefaultBaseController;
import ink.wgink.exceptions.ParamsException;
import ink.wgink.interfaces.consts.ISystemConstant;
@ -58,9 +59,18 @@ public class ShopMemberAppController extends DefaultBaseController {
@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 ShopMemberVO shopMemberVO) {
@PostMapping("save/{shopId}")
public SuccessResult save(@RequestHeader("token") String token,@PathVariable("shopId") String shopId) {
String userId = AppTokenManager.getInstance().getToken(token).getAppTokenUser().getId();
if(StringUtils.isBlank(userId)){
throw new ParamsException("请重新登录");
}
if(StringUtils.isBlank(shopId)){
throw new ParamsException("系统异常");
}
ShopMemberVO shopMemberVO = new ShopMemberVO();
shopMemberVO.setShopId(shopId);
shopMemberVO.setUserId(userId);
shopMemberService.save(token, shopMemberVO);
return new SuccessResult();
}

View File

@ -1,6 +1,7 @@
package cn.com.tenlion.controller.app.api.shopstaff;
package cn.com.tenlion.controller.app.apis.shopstaff;
import ink.wgink.annotation.CheckRequestBodyAnnotation;
import ink.wgink.app.AppTokenManager;
import ink.wgink.common.base.DefaultBaseController;
import ink.wgink.exceptions.ParamsException;
import ink.wgink.interfaces.consts.ISystemConstant;
@ -36,6 +37,7 @@ public class ShopStaffAppController extends DefaultBaseController {
@Autowired
private IShopStaffService shopStaffService;
@ApiOperation(value = "获取店铺员工列表", notes = "获取店铺员工列表接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header")
@ -51,19 +53,26 @@ public class ShopStaffAppController extends DefaultBaseController {
return shopStaffService.list(params);
}
@ApiOperation(value = "新增", notes = "新增接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PostMapping("save")
@PostMapping("save/{shopId}")
@CheckRequestBodyAnnotation
public SuccessResult save(@RequestHeader("token") String token, @RequestBody ShopStaffVO shopStaffVO) {
public SuccessResult save(@RequestHeader("token") String token,@PathVariable("shopId") String shopId) {
String userId = AppTokenManager.getInstance().getToken(token).getAppTokenUser().getId();
if(StringUtils.isBlank(userId)){
throw new ParamsException("请重新登录");
}
if(StringUtils.isBlank(shopId)){
throw new ParamsException("系统异常");
}
ShopStaffVO shopStaffVO = new ShopStaffVO();
shopStaffVO.setUserId(userId);
shopStaffVO.setShopId(shopId);
shopStaffVO.setIsLeader(0);
shopStaffVO.setIsAdmin(0);
shopStaffService.save(token, shopStaffVO);
return new SuccessResult();
}

View File

@ -0,0 +1,130 @@
package cn.com.tenlion.dao.shopcertification;
import ink.wgink.exceptions.RemoveException;
import ink.wgink.exceptions.SaveException;
import ink.wgink.exceptions.SearchException;
import ink.wgink.exceptions.UpdateException;
import cn.com.tenlion.pojo.bos.shopcertification.ShopCertificationBO;
import cn.com.tenlion.pojo.pos.shopcertification.ShopCertificationPO;
import cn.com.tenlion.pojo.dtos.shopcertification.ShopCertificationDTO;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Map;
/**
* @ClassName: IShopCertificationDao
* @Description: 店铺认证
* @Author: CodeFactory
* @Date: 2021-04-07 17:47:38
* @Version: 3.0
**/
@Repository
public interface IShopCertificationDao {
/**
* 查询店铺审核状态未审核或者审核通过的记录
* @param params
* @return
* @throws SearchException
*/
ShopCertificationDTO getByShopIdAndAuditStatus(Map<String, Object> params) throws SearchException;
/**
* 新增店铺认证
*
* @param params
* @throws SaveException
*/
void save(Map<String, Object> params) throws SaveException;
/**
* 删除店铺认证
*
* @param params
* @throws RemoveException
*/
void remove(Map<String, Object> params) throws RemoveException;
/**
* 删除店铺认证物理
*
* @param params
* @throws RemoveException
*/
void delete(Map<String, Object> params) throws RemoveException;
/**
* 修改店铺认证
*
* @param params
* @throws UpdateException
*/
void update(Map<String, Object> params) throws UpdateException;
/**
* 店铺认证详情
*
* @param params
* @return
* @throws SearchException
*/
ShopCertificationDTO get(Map<String, Object> params) throws SearchException;
/**
* 店铺认证详情
*
* @param params
* @return
* @throws SearchException
*/
ShopCertificationBO getBO(Map<String, Object> params) throws SearchException;
/**
* 店铺认证详情
*
* @param params
* @return
* @throws SearchException
*/
ShopCertificationPO getPO(Map<String, Object> params) throws SearchException;
/**
* 店铺认证列表
*
* @param params
* @return
* @throws SearchException
*/
List<ShopCertificationDTO> list(Map<String, Object> params) throws SearchException;
/**
* 店铺认证列表
*
* @param params
* @return
* @throws SearchException
*/
List<ShopCertificationBO> listBO(Map<String, Object> params) throws SearchException;
/**
* 店铺认证列表
*
* @param params
* @return
* @throws SearchException
*/
List<ShopCertificationPO> listPO(Map<String, Object> params) throws SearchException;
/**
* 店铺认证统计
*
* @param params
* @return
* @throws SearchException
*/
Integer count(Map<String, Object> params) throws SearchException;
}

View File

@ -1,5 +1,6 @@
package cn.com.tenlion.dao.shopmember;
import cn.com.tenlion.pojo.dtos.shopstaff.ShopStaffDTO;
import ink.wgink.exceptions.RemoveException;
import ink.wgink.exceptions.SaveException;
import ink.wgink.exceptions.SearchException;
@ -22,6 +23,15 @@ import java.util.Map;
@Repository
public interface IShopMemberDao {
/**
* 根据用户ID和店铺ID查询
* @param params
* @return
* @throws SearchException
*/
ShopMemberDTO getByUserIdAndShopId(Map<String,Object> params) throws SearchException;
/**
* 新增
*

View File

@ -22,6 +22,15 @@ import java.util.Map;
@Repository
public interface IShopStaffDao {
/**
* 根据用户ID和店铺ID查询
* @param params
* @return
* @throws SearchException
*/
ShopStaffDTO getByUserIdAndShopId(Map<String, Object> params) throws SearchException;
/**
* 新增
*

View File

@ -0,0 +1,194 @@
package cn.com.tenlion.pojo.bos.shopcertification;
/**
*
* @ClassName: ShopCertificationBO
* @Description: 店铺认证
* @Author: CodeFactory
* @Date: 2021-04-07 17:47:38
* @Version: 3.0
**/
public class ShopCertificationBO {
private String shopCertificationId;
private String shopId;
private String certificationId;
private String certificationNumber;
private String certificationName;
private String certificationType;
private String certificationAddress;
private String certificationLegalPerson;
private String certificationCapital;
private String certificationFoundTime;
private String certificationLicenseTerm;
private String certificationBusiness;
private String certificationAuthority;
private String certificationComposition;
private String certificationImage;
private String gmtCreate;
private String creator;
private String gmtModified;
private String modifier;
private Integer isDelete;
public String getShopCertificationId() {
return shopCertificationId == null ? "" : shopCertificationId.trim();
}
public void setShopCertificationId(String shopCertificationId) {
this.shopCertificationId = shopCertificationId;
}
public String getCertificationId() {
return certificationId == null ? "" : certificationId.trim();
}
public void setCertificationId(String certificationId) {
this.certificationId = certificationId;
}
public String getCertificationNumber() {
return certificationNumber == null ? "" : certificationNumber.trim();
}
public void setCertificationNumber(String certificationNumber) {
this.certificationNumber = certificationNumber;
}
public String getCertificationName() {
return certificationName == null ? "" : certificationName.trim();
}
public void setCertificationName(String certificationName) {
this.certificationName = certificationName;
}
public String getCertificationType() {
return certificationType == null ? "" : certificationType.trim();
}
public void setCertificationType(String certificationType) {
this.certificationType = certificationType;
}
public String getCertificationAddress() {
return certificationAddress == null ? "" : certificationAddress.trim();
}
public void setCertificationAddress(String certificationAddress) {
this.certificationAddress = certificationAddress;
}
public String getCertificationLegalPerson() {
return certificationLegalPerson == null ? "" : certificationLegalPerson.trim();
}
public void setCertificationLegalPerson(String certificationLegalPerson) {
this.certificationLegalPerson = certificationLegalPerson;
}
public String getCertificationCapital() {
return certificationCapital == null ? "" : certificationCapital.trim();
}
public void setCertificationCapital(String certificationCapital) {
this.certificationCapital = certificationCapital;
}
public String getCertificationFoundTime() {
return certificationFoundTime == null ? "" : certificationFoundTime.trim();
}
public void setCertificationFoundTime(String certificationFoundTime) {
this.certificationFoundTime = certificationFoundTime;
}
public String getCertificationLicenseTerm() {
return certificationLicenseTerm == null ? "" : certificationLicenseTerm.trim();
}
public void setCertificationLicenseTerm(String certificationLicenseTerm) {
this.certificationLicenseTerm = certificationLicenseTerm;
}
public String getCertificationBusiness() {
return certificationBusiness == null ? "" : certificationBusiness.trim();
}
public void setCertificationBusiness(String certificationBusiness) {
this.certificationBusiness = certificationBusiness;
}
public String getCertificationAuthority() {
return certificationAuthority == null ? "" : certificationAuthority.trim();
}
public void setCertificationAuthority(String certificationAuthority) {
this.certificationAuthority = certificationAuthority;
}
public String getCertificationComposition() {
return certificationComposition == null ? "" : certificationComposition.trim();
}
public void setCertificationComposition(String certificationComposition) {
this.certificationComposition = certificationComposition;
}
public String getGmtCreate() {
return gmtCreate == null ? "" : gmtCreate.trim();
}
public void setGmtCreate(String gmtCreate) {
this.gmtCreate = gmtCreate;
}
public String getCreator() {
return creator == null ? "" : creator.trim();
}
public void setCreator(String creator) {
this.creator = creator;
}
public String getGmtModified() {
return gmtModified == null ? "" : gmtModified.trim();
}
public void setGmtModified(String gmtModified) {
this.gmtModified = gmtModified;
}
public String getModifier() {
return modifier == null ? "" : modifier.trim();
}
public void setModifier(String modifier) {
this.modifier = modifier;
}
public Integer getIsDelete() {
return isDelete == null ? 0 : isDelete;
}
public void setIsDelete(Integer isDelete) {
this.isDelete = isDelete;
}
public String getShopId() {
return shopId;
}
public void setShopId(String shopId) {
this.shopId = shopId;
}
public String getCertificationImage() {
return certificationImage;
}
public void setCertificationImage(String certificationImage) {
this.certificationImage = certificationImage;
}
}

View File

@ -17,6 +17,7 @@ public class ShopStaffBO {
private Integer isLeader;
private Integer isAdmin;
private Integer auditStatus;
private String auditResult;
private String gmtCreate;
private String creator;
private String gmtModified;
@ -79,6 +80,14 @@ public class ShopStaffBO {
this.auditStatus = auditStatus;
}
public String getAuditResult() {
return auditResult;
}
public void setAuditResult(String auditResult) {
this.auditResult = auditResult;
}
public String getGmtCreate() {
return gmtCreate == null ? "" : gmtCreate.trim();
}

View File

@ -0,0 +1,189 @@
package cn.com.tenlion.pojo.dtos.shopcertification;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
*
* @ClassName: ShopCertificationDTO
* @Description: 店铺认证
* @Author: CodeFactory
* @Date: 2021-04-07 17:47:38
* @Version: 3.0
**/
@ApiModel
public class ShopCertificationDTO {
@ApiModelProperty(name = "shopCertificationId", value = "店铺认证ID")
private String shopCertificationId;
@ApiModelProperty(name = "shopId", value = "店铺ID")
private String shopId;
@ApiModelProperty(name = "shopName", value = "店铺名称")
private String shopName;
@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 = "企业类型")
private String certificationType;
@ApiModelProperty(name = "certificationAddress", value = "企业地址")
private String certificationAddress;
@ApiModelProperty(name = "certificationLegalPerson", value = "企业法定代表人")
private String certificationLegalPerson;
@ApiModelProperty(name = "certificationCapital", value = "企业注册资本")
private String certificationCapital;
@ApiModelProperty(name = "certificationFoundTime", value = "企业注册时间")
private String certificationFoundTime;
@ApiModelProperty(name = "certificationLicenseTerm", value = "营业期限")
private String certificationLicenseTerm;
@ApiModelProperty(name = "certificationBusiness", value = "企业经营范围")
private String certificationBusiness;
@ApiModelProperty(name = "certificationAuthority", value = "登记机关")
private String certificationAuthority;
@ApiModelProperty(name = "certificationComposition", value = "企业组成形式")
private String certificationComposition;
@ApiModelProperty(name = "营业执照图片", value = "营业执照图片")
private String certificationImage;
@ApiModelProperty(name = "审核状态", value = "0 未审核 1审核通过 -1审核不通过")
private Integer auditStatus;
public String getShopCertificationId() {
return shopCertificationId == null ? "" : shopCertificationId.trim();
}
public void setShopCertificationId(String shopCertificationId) {
this.shopCertificationId = shopCertificationId;
}
public String getCertificationId() {
return certificationId == null ? "" : certificationId.trim();
}
public void setCertificationId(String certificationId) {
this.certificationId = certificationId;
}
public String getCertificationNumber() {
return certificationNumber == null ? "" : certificationNumber.trim();
}
public void setCertificationNumber(String certificationNumber) {
this.certificationNumber = certificationNumber;
}
public String getCertificationName() {
return certificationName == null ? "" : certificationName.trim();
}
public void setCertificationName(String certificationName) {
this.certificationName = certificationName;
}
public String getCertificationType() {
return certificationType == null ? "" : certificationType.trim();
}
public void setCertificationType(String certificationType) {
this.certificationType = certificationType;
}
public String getCertificationAddress() {
return certificationAddress == null ? "" : certificationAddress.trim();
}
public void setCertificationAddress(String certificationAddress) {
this.certificationAddress = certificationAddress;
}
public String getCertificationLegalPerson() {
return certificationLegalPerson == null ? "" : certificationLegalPerson.trim();
}
public void setCertificationLegalPerson(String certificationLegalPerson) {
this.certificationLegalPerson = certificationLegalPerson;
}
public String getCertificationCapital() {
return certificationCapital == null ? "" : certificationCapital.trim();
}
public void setCertificationCapital(String certificationCapital) {
this.certificationCapital = certificationCapital;
}
public String getCertificationFoundTime() {
return certificationFoundTime == null ? "" : certificationFoundTime.trim();
}
public void setCertificationFoundTime(String certificationFoundTime) {
this.certificationFoundTime = certificationFoundTime;
}
public String getCertificationLicenseTerm() {
return certificationLicenseTerm == null ? "" : certificationLicenseTerm.trim();
}
public void setCertificationLicenseTerm(String certificationLicenseTerm) {
this.certificationLicenseTerm = certificationLicenseTerm;
}
public String getCertificationBusiness() {
return certificationBusiness == null ? "" : certificationBusiness.trim();
}
public void setCertificationBusiness(String certificationBusiness) {
this.certificationBusiness = certificationBusiness;
}
public String getCertificationAuthority() {
return certificationAuthority == null ? "" : certificationAuthority.trim();
}
public void setCertificationAuthority(String certificationAuthority) {
this.certificationAuthority = certificationAuthority;
}
public String getCertificationComposition() {
return certificationComposition == null ? "" : certificationComposition.trim();
}
public void setCertificationComposition(String certificationComposition) {
this.certificationComposition = certificationComposition;
}
public String getShopId() {
return shopId;
}
public void setShopId(String shopId) {
this.shopId = shopId;
}
public String getShopName() {
return shopName;
}
public void setShopName(String shopName) {
this.shopName = shopName;
}
public String getCertificationImage() {
return certificationImage;
}
public void setCertificationImage(String certificationImage) {
this.certificationImage = certificationImage;
}
public Integer getAuditStatus() {
return auditStatus;
}
public void setAuditStatus(Integer auditStatus) {
this.auditStatus = auditStatus;
}
}

View File

@ -29,6 +29,7 @@ public class ShopStaffDTO {
private String positionName;
@ApiModelProperty(name = "isLeader", value = "是否店长(领导) 0否 1是")
private Integer isLeader;
@ApiModelProperty(name = "isAdmin", value = "是否为管理员")
@ -36,6 +37,9 @@ public class ShopStaffDTO {
@ApiModelProperty(name = "auditStatus", value = "审核状态 0未审核 1审核通过 -1审核不通过")
private Integer auditStatus;
@ApiModelProperty(name = "auditResult", value = "审核说明")
private String auditResult;
@ApiModelProperty(name = "gmtCreate", value = "创建时间")
@ -103,6 +107,14 @@ public class ShopStaffDTO {
this.auditStatus = auditStatus;
}
public String getAuditResult() {
return auditResult;
}
public void setAuditResult(String auditResult) {
this.auditResult = auditResult;
}
public String getGmtCreate() {
return gmtCreate == null ? "" : gmtCreate.trim();
}

View File

@ -0,0 +1,193 @@
package cn.com.tenlion.pojo.pos.shopcertification;
/**
*
* @ClassName: ShopCertificationPO
* @Description: 店铺认证
* @Author: CodeFactory
* @Date: 2021-04-07 17:47:38
* @Version: 3.0
**/
public class ShopCertificationPO {
private String shopCertificationId;
private String shopId;
private String certificationId;
private String certificationNumber;
private String certificationName;
private String certificationType;
private String certificationAddress;
private String certificationLegalPerson;
private String certificationCapital;
private String certificationFoundTime;
private String certificationLicenseTerm;
private String certificationBusiness;
private String certificationAuthority;
private String certificationComposition;
private String certificationImage;
private String gmtCreate;
private String creator;
private String gmtModified;
private String modifier;
private Integer isDelete;
public String getShopCertificationId() {
return shopCertificationId == null ? "" : shopCertificationId.trim();
}
public void setShopCertificationId(String shopCertificationId) {
this.shopCertificationId = shopCertificationId;
}
public String getCertificationId() {
return certificationId == null ? "" : certificationId.trim();
}
public void setCertificationId(String certificationId) {
this.certificationId = certificationId;
}
public String getCertificationNumber() {
return certificationNumber == null ? "" : certificationNumber.trim();
}
public void setCertificationNumber(String certificationNumber) {
this.certificationNumber = certificationNumber;
}
public String getCertificationName() {
return certificationName == null ? "" : certificationName.trim();
}
public void setCertificationName(String certificationName) {
this.certificationName = certificationName;
}
public String getCertificationType() {
return certificationType == null ? "" : certificationType.trim();
}
public void setCertificationType(String certificationType) {
this.certificationType = certificationType;
}
public String getCertificationAddress() {
return certificationAddress == null ? "" : certificationAddress.trim();
}
public void setCertificationAddress(String certificationAddress) {
this.certificationAddress = certificationAddress;
}
public String getCertificationLegalPerson() {
return certificationLegalPerson == null ? "" : certificationLegalPerson.trim();
}
public void setCertificationLegalPerson(String certificationLegalPerson) {
this.certificationLegalPerson = certificationLegalPerson;
}
public String getCertificationCapital() {
return certificationCapital == null ? "" : certificationCapital.trim();
}
public void setCertificationCapital(String certificationCapital) {
this.certificationCapital = certificationCapital;
}
public String getCertificationFoundTime() {
return certificationFoundTime == null ? "" : certificationFoundTime.trim();
}
public void setCertificationFoundTime(String certificationFoundTime) {
this.certificationFoundTime = certificationFoundTime;
}
public String getCertificationLicenseTerm() {
return certificationLicenseTerm == null ? "" : certificationLicenseTerm.trim();
}
public void setCertificationLicenseTerm(String certificationLicenseTerm) {
this.certificationLicenseTerm = certificationLicenseTerm;
}
public String getCertificationBusiness() {
return certificationBusiness == null ? "" : certificationBusiness.trim();
}
public void setCertificationBusiness(String certificationBusiness) {
this.certificationBusiness = certificationBusiness;
}
public String getCertificationAuthority() {
return certificationAuthority == null ? "" : certificationAuthority.trim();
}
public void setCertificationAuthority(String certificationAuthority) {
this.certificationAuthority = certificationAuthority;
}
public String getCertificationComposition() {
return certificationComposition == null ? "" : certificationComposition.trim();
}
public void setCertificationComposition(String certificationComposition) {
this.certificationComposition = certificationComposition;
}
public String getGmtCreate() {
return gmtCreate == null ? "" : gmtCreate.trim();
}
public void setGmtCreate(String gmtCreate) {
this.gmtCreate = gmtCreate;
}
public String getCreator() {
return creator == null ? "" : creator.trim();
}
public void setCreator(String creator) {
this.creator = creator;
}
public String getGmtModified() {
return gmtModified == null ? "" : gmtModified.trim();
}
public void setGmtModified(String gmtModified) {
this.gmtModified = gmtModified;
}
public String getModifier() {
return modifier == null ? "" : modifier.trim();
}
public void setModifier(String modifier) {
this.modifier = modifier;
}
public Integer getIsDelete() {
return isDelete == null ? 0 : isDelete;
}
public void setIsDelete(Integer isDelete) {
this.isDelete = isDelete;
}
public String getShopId() {
return shopId;
}
public void setShopId(String shopId) {
this.shopId = shopId;
}
public String getCertificationImage() {
return certificationImage;
}
public void setCertificationImage(String certificationImage) {
this.certificationImage = certificationImage;
}
}

View File

@ -1,5 +1,7 @@
package cn.com.tenlion.pojo.pos.shopstaff;
import io.swagger.annotations.ApiModelProperty;
/**
*
* @ClassName: ShopStaffPO
@ -18,6 +20,7 @@ public class ShopStaffPO {
private Integer isLeader;
private Integer isAdmin;
private Integer auditStatus;
private String auditResult;
private String gmtCreate;
private String creator;
private String gmtModified;
@ -80,6 +83,14 @@ public class ShopStaffPO {
this.auditStatus = auditStatus;
}
public String getAuditResult() {
return auditResult;
}
public void setAuditResult(String auditResult) {
this.auditResult = auditResult;
}
public String getGmtCreate() {
return gmtCreate == null ? "" : gmtCreate.trim();
}

View File

@ -26,7 +26,6 @@ public class ShopAuditLogVO {
@ApiModelProperty(name = "auditResult", value = "审核说明")
private String auditResult;
@ApiModelProperty(name = "auditDate", value = "审核时间")
@CheckEmptyAnnotation(name = "审核时间", verifyType = "datetime")
private String auditDate;
public String getShopId() {

View File

@ -0,0 +1,159 @@
package cn.com.tenlion.pojo.vos.shopcertification;
import ink.wgink.annotation.CheckEmptyAnnotation;
import ink.wgink.annotation.CheckNumberAnnotation;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
*
* @ClassName: ShopCertificationVO
* @Description: 店铺认证
* @Author: CodeFactory
* @Date: 2021-04-07 17:47:38
* @Version: 3.0
**/
@ApiModel
public class ShopCertificationVO {
@ApiModelProperty(name = "certificationId", value = "统一信用代码")
private String certificationId;
@ApiModelProperty(name = "shopId", value = "店铺ID")
private String shopId;
@ApiModelProperty(name = "certificationNumber", value = "证书编号")
private String certificationNumber;
@ApiModelProperty(name = "certificationName", value = "企业名称")
private String certificationName;
@ApiModelProperty(name = "certificationType", value = "企业类型")
private String certificationType;
@ApiModelProperty(name = "certificationAddress", value = "企业地址")
private String certificationAddress;
@ApiModelProperty(name = "certificationLegalPerson", value = "企业法定代表人")
private String certificationLegalPerson;
@ApiModelProperty(name = "certificationCapital", value = "企业注册资本")
private String certificationCapital;
@ApiModelProperty(name = "certificationFoundTime", value = "企业注册时间")
private String certificationFoundTime;
@ApiModelProperty(name = "certificationLicenseTerm", value = "营业期限")
private String certificationLicenseTerm;
@ApiModelProperty(name = "certificationBusiness", value = "企业经营范围")
private String certificationBusiness;
@ApiModelProperty(name = "certificationAuthority", value = "登记机关")
private String certificationAuthority;
@ApiModelProperty(name = "certificationComposition", value = "企业组成形式")
private String certificationComposition;
@ApiModelProperty(name = "certificationImage", value = "营业执照照片")
private String certificationImage;
public String getCertificationId() {
return certificationId == null ? "" : certificationId.trim();
}
public void setCertificationId(String certificationId) {
this.certificationId = certificationId;
}
public String getCertificationNumber() {
return certificationNumber == null ? "" : certificationNumber.trim();
}
public void setCertificationNumber(String certificationNumber) {
this.certificationNumber = certificationNumber;
}
public String getCertificationName() {
return certificationName == null ? "" : certificationName.trim();
}
public void setCertificationName(String certificationName) {
this.certificationName = certificationName;
}
public String getCertificationType() {
return certificationType == null ? "" : certificationType.trim();
}
public void setCertificationType(String certificationType) {
this.certificationType = certificationType;
}
public String getCertificationAddress() {
return certificationAddress == null ? "" : certificationAddress.trim();
}
public void setCertificationAddress(String certificationAddress) {
this.certificationAddress = certificationAddress;
}
public String getCertificationLegalPerson() {
return certificationLegalPerson == null ? "" : certificationLegalPerson.trim();
}
public void setCertificationLegalPerson(String certificationLegalPerson) {
this.certificationLegalPerson = certificationLegalPerson;
}
public String getCertificationCapital() {
return certificationCapital == null ? "" : certificationCapital.trim();
}
public void setCertificationCapital(String certificationCapital) {
this.certificationCapital = certificationCapital;
}
public String getCertificationFoundTime() {
return certificationFoundTime == null ? "" : certificationFoundTime.trim();
}
public void setCertificationFoundTime(String certificationFoundTime) {
this.certificationFoundTime = certificationFoundTime;
}
public String getCertificationLicenseTerm() {
return certificationLicenseTerm == null ? "" : certificationLicenseTerm.trim();
}
public void setCertificationLicenseTerm(String certificationLicenseTerm) {
this.certificationLicenseTerm = certificationLicenseTerm;
}
public String getCertificationBusiness() {
return certificationBusiness == null ? "" : certificationBusiness.trim();
}
public void setCertificationBusiness(String certificationBusiness) {
this.certificationBusiness = certificationBusiness;
}
public String getCertificationAuthority() {
return certificationAuthority == null ? "" : certificationAuthority.trim();
}
public void setCertificationAuthority(String certificationAuthority) {
this.certificationAuthority = certificationAuthority;
}
public String getCertificationComposition() {
return certificationComposition == null ? "" : certificationComposition.trim();
}
public void setCertificationComposition(String certificationComposition) {
this.certificationComposition = certificationComposition;
}
public String getShopId() {
return shopId;
}
public void setShopId(String shopId) {
this.shopId = shopId;
}
public String getCertificationImage() {
return certificationImage;
}
public void setCertificationImage(String certificationImage) {
this.certificationImage = certificationImage;
}
}

View File

@ -1,9 +1,12 @@
package cn.com.tenlion.service.shopauditlog.impl;
import cn.com.tenlion.service.shop.IShopService;
import ink.wgink.common.base.DefaultBaseService;
import ink.wgink.common.component.SecurityComponent;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList;
import ink.wgink.util.date.DateUtil;
import ink.wgink.util.map.HashMapUtil;
import ink.wgink.util.UUIDUtil;
import cn.com.tenlion.dao.shopauditlog.IShopAuditLogDao;
@ -33,6 +36,11 @@ public class ShopAuditLogServiceImpl extends DefaultBaseService implements IShop
@Autowired
private IShopAuditLogDao shopAuditLogDao;
private SecurityComponent securityComponent;
@Autowired
private IShopService shopService;
@Override
public void save(ShopAuditLogVO shopAuditLogVO) {
saveReturnId(shopAuditLogVO);
@ -53,12 +61,18 @@ public class ShopAuditLogServiceImpl extends DefaultBaseService implements IShop
String shopAuditLogId = UUIDUtil.getUUID();
Map<String, Object> params = HashMapUtil.beanToMap(shopAuditLogVO);
params.put("shopAuditLogId", shopAuditLogId);
params.put("auditDate", DateUtil.getTime());
params.put("auditUser", securityComponent.getCurrentUser().getUserId());
params.put("auditUserName", securityComponent.getCurrentUser().getUserName());
if (StringUtils.isBlank(token)) {
setSaveInfo(params);
} else {
setAppSaveInfo(token, params);
}
shopAuditLogDao.save(params);
return shopAuditLogId;
}

View File

@ -0,0 +1,188 @@
package cn.com.tenlion.service.shopcertification;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.SuccessResultList;
import cn.com.tenlion.pojo.dtos.shopcertification.ShopCertificationDTO;
import cn.com.tenlion.pojo.vos.shopcertification.ShopCertificationVO;
import cn.com.tenlion.pojo.bos.shopcertification.ShopCertificationBO;
import cn.com.tenlion.pojo.pos.shopcertification.ShopCertificationPO;
import java.util.List;
import java.util.Map;
/**
* @ClassName: IShopCertificationService
* @Description: 店铺认证
* @Author: CodeFactory
* @Date: 2021-04-07 17:47:38
* @Version: 3.0
**/
public interface IShopCertificationService {
/**
* 新增店铺认证
*
* @param shopCertificationVO
* @return
*/
void save(ShopCertificationVO shopCertificationVO);
/**
* 新增店铺认证
*
* @param token
* @param shopCertificationVO
* @return
*/
void save(String token, ShopCertificationVO shopCertificationVO);
/**
* 新增店铺认证
*
* @param shopCertificationVO
* @return shopCertificationId
*/
String saveReturnId(ShopCertificationVO shopCertificationVO);
/**
* 新增店铺认证
*
* @param token
* @param shopCertificationVO
* @return shopCertificationId
*/
String saveReturnId(String token, ShopCertificationVO shopCertificationVO);
/**
* 删除店铺认证
*
* @param ids id列表
* @return
*/
void remove(List<String> ids);
/**
* 删除店铺认证
*
* @param token
* @param ids id列表
* @return
*/
void remove(String token, List<String> ids);
/**
* 删除店铺认证物理删除
*
* @param ids id列表
*/
void delete(List<String> ids);
/**
* 修改店铺认证
*
* @param shopCertificationId
* @param shopCertificationVO
* @return
*/
void update(String shopCertificationId, ShopCertificationVO shopCertificationVO);
/**
* 修改店铺认证
*
* @param token
* @param shopCertificationId
* @param shopCertificationVO
* @return
*/
void update(String token, String shopCertificationId, ShopCertificationVO shopCertificationVO);
/**
* 店铺认证详情
*
* @param params 参数Map
* @return
*/
ShopCertificationDTO get(Map<String, Object> params);
/**
* 店铺认证详情
*
* @param shopCertificationId
* @return
*/
ShopCertificationDTO get(String shopCertificationId);
/**
* 店铺认证详情
*
* @param params 参数Map
* @return
*/
ShopCertificationBO getBO(Map<String, Object> params);
/**
* 店铺认证详情
*
* @param shopCertificationId
* @return
*/
ShopCertificationBO getBO(String shopCertificationId);
/**
* 店铺认证详情
*
* @param params 参数Map
* @return
*/
ShopCertificationPO getPO(Map<String, Object> params);
/**
* 店铺认证详情
*
* @param shopCertificationId
* @return
*/
ShopCertificationPO getPO(String shopCertificationId);
/**
* 店铺认证列表
*
* @param params
* @return
*/
List<ShopCertificationDTO> list(Map<String, Object> params);
/**
* 店铺认证列表
*
* @param params
* @return
*/
List<ShopCertificationBO> listBO(Map<String, Object> params);
/**
* 店铺认证列表
*
* @param params
* @return
*/
List<ShopCertificationPO> listPO(Map<String, Object> params);
/**
* 店铺认证分页列表
*
* @param page
* @return
*/
SuccessResultList<List<ShopCertificationDTO>> listPage(ListPage page);
/**
* 店铺认证统计
*
* @param params
* @return
*/
Integer count(Map<String, Object> params);
}

View File

@ -0,0 +1,179 @@
package cn.com.tenlion.service.shopcertification.impl;
import ink.wgink.common.base.DefaultBaseService;
import ink.wgink.exceptions.ParamsException;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList;
import ink.wgink.util.map.HashMapUtil;
import ink.wgink.util.UUIDUtil;
import cn.com.tenlion.dao.shopcertification.IShopCertificationDao;
import cn.com.tenlion.pojo.dtos.shopcertification.ShopCertificationDTO;
import cn.com.tenlion.pojo.vos.shopcertification.ShopCertificationVO;
import cn.com.tenlion.pojo.bos.shopcertification.ShopCertificationBO;
import cn.com.tenlion.pojo.pos.shopcertification.ShopCertificationPO;
import cn.com.tenlion.service.shopcertification.IShopCertificationService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.*;
/**
* @ClassName: ShopCertificationServiceImpl
* @Description: 店铺认证
* @Author: CodeFactory
* @Date: 2021-04-07 17:47:38
* @Version: 3.0
**/
@Service
public class ShopCertificationServiceImpl extends DefaultBaseService implements IShopCertificationService {
@Autowired
private IShopCertificationDao shopCertificationDao;
@Override
public void save(ShopCertificationVO shopCertificationVO) {
saveReturnId(shopCertificationVO);
}
@Override
public void save(String token, ShopCertificationVO shopCertificationVO) {
saveReturnId(token, shopCertificationVO);
}
@Override
public String saveReturnId(ShopCertificationVO shopCertificationVO) {
return saveReturnId(null, shopCertificationVO);
}
@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 shopCertificationId = UUIDUtil.getUUID();
Map<String, Object> params = HashMapUtil.beanToMap(shopCertificationVO);
params.put("shopCertificationId", shopCertificationId);
params.put("auditStatus", 0);
if (StringUtils.isBlank(token)) {
setSaveInfo(params);
} else {
setAppSaveInfo(token, params);
}
shopCertificationDao.save(params);
return shopCertificationId;
}
@Override
public void remove(List<String> ids) {
remove(null, ids);
}
@Override
public void remove(String token, List<String> ids) {
Map<String, Object> params = getHashMap(2);
params.put("shopCertificationIds", ids);
if (StringUtils.isBlank(token)) {
setUpdateInfo(params);
} else {
setAppUpdateInfo(token, params);
}
shopCertificationDao.remove(params);
}
@Override
public void delete(List<String> ids) {
Map<String, Object> params = getHashMap(2);
params.put("shopCertificationIds", ids);
shopCertificationDao.delete(params);
}
@Override
public void update(String shopCertificationId, ShopCertificationVO shopCertificationVO) {
update(null, shopCertificationId, shopCertificationVO);
}
@Override
public void update(String token, String shopCertificationId, ShopCertificationVO shopCertificationVO) {
Map<String, Object> params = HashMapUtil.beanToMap(shopCertificationVO);
params.put("shopCertificationId", shopCertificationId);
if (StringUtils.isBlank(token)) {
setUpdateInfo(params);
} else {
setAppUpdateInfo(token, params);
}
shopCertificationDao.update(params);
}
@Override
public ShopCertificationDTO get(Map<String, Object> params) {
return shopCertificationDao.get(params);
}
@Override
public ShopCertificationDTO get(String shopCertificationId) {
Map<String, Object> params = super.getHashMap(2);
params.put("shopCertificationId", shopCertificationId);
return get(params);
}
@Override
public ShopCertificationBO getBO(Map<String, Object> params) {
return shopCertificationDao.getBO(params);
}
@Override
public ShopCertificationBO getBO(String shopCertificationId) {
Map<String, Object> params = super.getHashMap(2);
params.put("shopCertificationId", shopCertificationId);
return getBO(params);
}
@Override
public ShopCertificationPO getPO(Map<String, Object> params) {
return shopCertificationDao.getPO(params);
}
@Override
public ShopCertificationPO getPO(String shopCertificationId) {
Map<String, Object> params = super.getHashMap(2);
params.put("shopCertificationId", shopCertificationId);
return getPO(params);
}
@Override
public List<ShopCertificationDTO> list(Map<String, Object> params) {
return shopCertificationDao.list(params);
}
@Override
public List<ShopCertificationBO> listBO(Map<String, Object> params) {
return shopCertificationDao.listBO(params);
}
@Override
public List<ShopCertificationPO> listPO(Map<String, Object> params) {
return shopCertificationDao.listPO(params);
}
@Override
public SuccessResultList<List<ShopCertificationDTO>> listPage(ListPage page) {
PageHelper.startPage(page.getPage(), page.getRows());
List<ShopCertificationDTO> shopCertificationDTOs = list(page.getParams());
PageInfo<ShopCertificationDTO> pageInfo = new PageInfo<>(shopCertificationDTOs);
return new SuccessResultList<>(shopCertificationDTOs, pageInfo.getPageNum(), pageInfo.getTotal());
}
@Override
public Integer count(Map<String, Object> params) {
Integer count = shopCertificationDao.count(params);
return count == null ? 0 : count;
}
}

View File

@ -1,6 +1,7 @@
package cn.com.tenlion.service.shopmember.impl;
import ink.wgink.common.base.DefaultBaseService;
import ink.wgink.exceptions.SaveException;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.dtos.user.UserDTO;
import ink.wgink.pojo.result.SuccessResult;
@ -44,6 +45,13 @@ public class ShopMemberServiceImpl extends DefaultBaseService implements IShopMe
@Override
public void save(String token, ShopMemberVO shopMemberVO) {
Map<String, Object> params = new HashMap<>();
params.put("userId",shopMemberVO.getUserId());
params.put("shopId",shopMemberVO.getShopId());
ShopMemberDTO sdto = shopMemberDao.getByUserIdAndShopId(params);
if(sdto != null){
throw new SaveException("您已经是该店铺的会员");
}
saveReturnId(token, shopMemberVO);
}
@ -57,6 +65,7 @@ public class ShopMemberServiceImpl extends DefaultBaseService implements IShopMe
String shopMemberId = UUIDUtil.getUUID();
Map<String, Object> params = HashMapUtil.beanToMap(shopMemberVO);
params.put("memberId", shopMemberId);
params.put("memberLevel",1);
if (StringUtils.isBlank(token)) {
setSaveInfo(params);
} else {

View File

@ -3,6 +3,7 @@ package cn.com.tenlion.service.shopstaff.impl;
import cn.com.tenlion.pojo.dtos.shopposition.ShopPositionDTO;
import cn.com.tenlion.service.shopposition.IShopPositionService;
import ink.wgink.common.base.DefaultBaseService;
import ink.wgink.exceptions.SaveException;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.dtos.user.UserDTO;
import ink.wgink.pojo.result.SuccessResult;
@ -49,6 +50,13 @@ public class ShopStaffServiceImpl extends DefaultBaseService implements IShopSta
@Override
public void save(String token, ShopStaffVO shopStaffVO) {
Map<String,Object> params = new HashMap<>();
params.put("userId",shopStaffVO.getUserId());
params.put("shopId",shopStaffVO.getShopId());
ShopStaffDTO sdto = shopStaffDao.getByUserIdAndShopId(params);
if(sdto != null){
throw new SaveException("您已是该店铺的员工");
}
saveReturnId(token, shopStaffVO);
}
@ -62,7 +70,7 @@ public class ShopStaffServiceImpl extends DefaultBaseService implements IShopSta
String shopStaffId = UUIDUtil.getUUID();
Map<String, Object> params = HashMapUtil.beanToMap(shopStaffVO);
params.put("shopStaffId", shopStaffId);
params.put("auditResult", "1");
params.put("auditStatus", 1);//默认审核通过
if (StringUtils.isBlank(token)) {
setSaveInfo(params);
} else {

View File

@ -59,6 +59,7 @@ public class QRCodeUtil {
iFileStaticService = iFileService;
}
private static BufferedImage createImage(String content, String imgPath, boolean needCompress) throws Exception {
Hashtable<EncodeHintType, Object> hints = new Hashtable<EncodeHintType, Object>();
hints.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.H);
@ -69,8 +70,8 @@ public class QRCodeUtil {
int height = bitMatrix.getHeight();
BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
for (int x = 0; x < width; x++) {
for (int y = 0; y < height; y++) {
image.setRGB(x, y, bitMatrix.get(x, y) ? 0xFF000000 : 0xFFFFFFFF);
for (int y = 0; y < height; y++) {// 0xFF0000FF
image.setRGB(x, y, bitMatrix.get(x, y) ? 0xFF000000 : 0xFFFFFFFF);
}
}
if (imgPath == null || "".equals(imgPath)) {
@ -256,22 +257,23 @@ public class QRCodeUtil {
// 生成
String fileName = QRCodeUtil.encode(content, null, filePath.toString(), false);
// 保存
Map<String, Object> params = new HashMap<String, Object>();
File qrCodeFile = new File(filePath.toString() + fileName);
File qrCodeFile = new File(filePath.toString() +"\\"+ fileName);
FileVO fileVO = new FileVO();
fileVO.setFileName(fileName);
fileVO.setFileFullPath(filePath.toString() + fileName);
fileVO.setFileUrl(null);
fileVO.setFileUrl("files\\"+filePath.substring(filePath.indexOf("images"), filePath.length())+"\\"+ fileName);
fileVO.setFilePath(filePath.toString() +"\\"+ fileName);
fileVO.setFileType("jpg");
fileVO.setFileSize(qrCodeFile.length());
iFileStaticService.saveFileByUserId(userId, fileVO);
return params.get("fileId").toString();
return iFileStaticService.saveFileByUserId(userId,fileVO);
}
public static void main(String[] args) throws Exception {
String text = "http://www.baidu.com"; //这里设置自定义网站url
String logoPath = "D:\\2020\\10\\10";
//String destPath = "C:\\Users\\admin\\Desktop\\test\\";
QRCodeUtil.encode(text, logoPath);
// String text = "http://www.baidu.com"; //这里设置自定义网站url
// String logoPath = "D:\\2020\\10\\10";
// //String destPath = "C:\\Users\\admin\\Desktop\\test\\";
// QRCodeUtil.encode(text, logoPath);
}
}

View File

@ -5,6 +5,7 @@
<resultMap id="shopAuditLogDTO" type="cn.com.tenlion.pojo.dtos.shopauditlog.ShopAuditLogDTO">
<result column="shop_id" property="shopId"/>
<result column="audit_user" property="auditUser"/>
<result column="audit_user_name" property="auditUserName"/>
<result column="audit_status" property="auditStatus"/>
<result column="audit_result" property="auditResult"/>
<result column="audit_date" property="auditDate"/>
@ -13,6 +14,7 @@
<resultMap id="shopAuditLogBO" type="cn.com.tenlion.pojo.bos.shopauditlog.ShopAuditLogBO">
<result column="shop_id" property="shopId"/>
<result column="audit_user" property="auditUser"/>
<result column="audit_user_name" property="auditUserName"/>
<result column="audit_status" property="auditStatus"/>
<result column="audit_result" property="auditResult"/>
<result column="audit_date" property="auditDate"/>
@ -21,6 +23,7 @@
<resultMap id="shopAuditLogPO" type="cn.com.tenlion.pojo.pos.shopauditlog.ShopAuditLogPO">
<result column="shop_id" property="shopId"/>
<result column="audit_user" property="auditUser"/>
<result column="audit_user_name" property="auditUserName"/>
<result column="audit_status" property="auditStatus"/>
<result column="audit_result" property="auditResult"/>
<result column="audit_date" property="auditDate"/>
@ -30,12 +33,14 @@
INSERT INTO svc_shop_audit_log(
shop_id,
audit_user,
audit_user_name,
audit_status,
audit_result,
audit_date
) VALUES(
#{shopId},
#{auditUser},
#{auditUserName},
#{auditStatus},
#{auditResult},
#{auditDate}
@ -75,10 +80,11 @@
SELECT
t1.shop_id,
t1.audit_user,
t1.audit_user_name,
t1.audit_status,
t1.audit_result,
t1.audit_date,
1
t1.audit_date
FROM
svc_shop_audit_log t1
WHERE

View File

@ -0,0 +1,481 @@
<?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="cn.com.tenlion.dao.shopcertification.IShopCertificationDao">
<resultMap id="shopCertificationDTO" type="cn.com.tenlion.pojo.dtos.shopcertification.ShopCertificationDTO">
<result column="shop_certification_id" property="shopCertificationId"/>
<result column="shop_id" property="shopId"/>
<result column="shop_name" property="shopName"/>
<result column="certification_id" property="certificationId"/>
<result column="certification_number" property="certificationNumber"/>
<result column="certification_name" property="certificationName"/>
<result column="certification_type" property="certificationType"/>
<result column="certification_address" property="certificationAddress"/>
<result column="certification_legal_person" property="certificationLegalPerson"/>
<result column="certification_capital" property="certificationCapital"/>
<result column="certification_found_time" property="certificationFoundTime"/>
<result column="certification_license_term" property="certificationLicenseTerm"/>
<result column="certification_business" property="certificationBusiness"/>
<result column="certification_authority" property="certificationAuthority"/>
<result column="certification_composition" property="certificationComposition"/>
<result column="certification_image" property="certificationImage"/>
<result column="audit_status" property="auditStatus"/>
</resultMap>
<resultMap id="shopCertificationBO" type="cn.com.tenlion.pojo.bos.shopcertification.ShopCertificationBO">
<result column="shop_certification_id" property="shopCertificationId"/>
<result column="shop_id" property="shopId"/>
<result column="certification_id" property="certificationId"/>
<result column="certification_number" property="certificationNumber"/>
<result column="certification_name" property="certificationName"/>
<result column="certification_type" property="certificationType"/>
<result column="certification_address" property="certificationAddress"/>
<result column="certification_legal_person" property="certificationLegalPerson"/>
<result column="certification_capital" property="certificationCapital"/>
<result column="certification_found_time" property="certificationFoundTime"/>
<result column="certification_license_term" property="certificationLicenseTerm"/>
<result column="certification_business" property="certificationBusiness"/>
<result column="certification_authority" property="certificationAuthority"/>
<result column="certification_composition" property="certificationComposition"/>
<result column="certification_image" property="certificationImage"/>
<result column="audit_status" property="auditStatus"/>
<result column="gmt_create" property="gmtCreate"/>
<result column="creator" property="creator"/>
<result column="gmt_modified" property="gmtModified"/>
<result column="modifier" property="modifier"/>
<result column="is_delete" property="isDelete"/>
</resultMap>
<resultMap id="shopCertificationPO" type="cn.com.tenlion.pojo.pos.shopcertification.ShopCertificationPO">
<result column="shop_certification_id" property="shopCertificationId"/>
<result column="shop_id" property="shopId"/>
<result column="certification_id" property="certificationId"/>
<result column="certification_number" property="certificationNumber"/>
<result column="certification_name" property="certificationName"/>
<result column="certification_type" property="certificationType"/>
<result column="certification_address" property="certificationAddress"/>
<result column="certification_legal_person" property="certificationLegalPerson"/>
<result column="certification_capital" property="certificationCapital"/>
<result column="certification_found_time" property="certificationFoundTime"/>
<result column="certification_license_term" property="certificationLicenseTerm"/>
<result column="certification_business" property="certificationBusiness"/>
<result column="certification_authority" property="certificationAuthority"/>
<result column="certification_composition" property="certificationComposition"/>
<result column="certification_image" property="certificationImage"/>
<result column="audit_status" property="auditStatus"/>
<result column="gmt_create" property="gmtCreate"/>
<result column="creator" property="creator"/>
<result column="gmt_modified" property="gmtModified"/>
<result column="modifier" property="modifier"/>
<result column="is_delete" property="isDelete"/>
</resultMap>
<!-- 新增店铺认证 -->
<insert id="save" parameterType="map">
INSERT INTO svc_shop_certification(
shop_certification_id,
shop_id,
certification_id,
certification_number,
certification_name,
certification_type,
certification_address,
certification_legal_person,
certification_capital,
certification_found_time,
certification_license_term,
certification_business,
certification_authority,
certification_composition,
certification_image,
audit_status,
gmt_create,
creator,
gmt_modified,
modifier,
is_delete
) VALUES(
#{shopCertificationId},
#{shopId},
#{certificationId},
#{certificationNumber},
#{certificationName},
#{certificationType},
#{certificationAddress},
#{certificationLegalPerson},
#{certificationCapital},
#{certificationFoundTime},
#{certificationLicenseTerm},
#{certificationBusiness},
#{certificationAuthority},
#{certificationComposition},
#{certificationImage},
#{auditStatus},
#{gmtCreate},
#{creator},
#{gmtModified},
#{modifier},
#{isDelete}
)
</insert>
<!-- 删除店铺认证 -->
<update id="remove" parameterType="map">
UPDATE
svc_shop_certification
SET
gmt_modified = #{gmtModified},
modifier = #{modifier},
is_delete = 1
WHERE
shop_certification_id IN
<foreach collection="shopCertificationIds" index="index" open="(" separator="," close=")">
#{shopCertificationIds[${index}]}
</foreach>
</update>
<!-- 删除店铺认证(物理) -->
<update id="delete" parameterType="map">
DELETE FROM
svc_shop_certification
WHERE
shop_certification_id IN
<foreach collection="shopCertificationIds" index="index" open="(" separator="," close=")">
#{shopCertificationIds[${index}]}
</foreach>
</update>
<!-- 修改店铺认证 -->
<update id="update" parameterType="map">
UPDATE
svc_shop_certification
SET
<if test="certificationId != null and certificationId != ''">
certification_id = #{certificationId},
</if>
<if test="shopId != null and shopId != ''">
shop_id = #{shopId},
</if>
<if test="certificationNumber != null and certificationNumber != ''">
certification_number = #{certificationNumber},
</if>
<if test="certificationName != null and certificationName != ''">
certification_name = #{certificationName},
</if>
<if test="certificationType != null and certificationType != ''">
certification_type = #{certificationType},
</if>
<if test="certificationAddress != null and certificationAddress != ''">
certification_address = #{certificationAddress},
</if>
<if test="certificationLegalPerson != null and certificationLegalPerson != ''">
certification_legal_person = #{certificationLegalPerson},
</if>
<if test="certificationCapital != null and certificationCapital != ''">
certification_capital = #{certificationCapital},
</if>
<if test="certificationFoundTime != null and certificationFoundTime != ''">
certification_found_time = #{certificationFoundTime},
</if>
<if test="certificationLicenseTerm != null and certificationLicenseTerm != ''">
certification_license_term = #{certificationLicenseTerm},
</if>
<if test="certificationBusiness != null and certificationBusiness != ''">
certification_business = #{certificationBusiness},
</if>
<if test="certificationAuthority != null and certificationAuthority != ''">
certification_authority = #{certificationAuthority},
</if>
<if test="certificationComposition != null and certificationComposition != ''">
certification_composition = #{certificationComposition},
</if>
<if test="certificationImage != null and certificationImage != ''">
certification_image = #{certificationImage},
</if>
<if test="auditStatus != null and auditStatus != ''">
audit_status = #{auditStatus},
</if>
gmt_modified = #{gmtModified},
modifier = #{modifier}
WHERE
shop_certification_id = #{shopCertificationId}
</update>
<!-- 店铺认证详情 -->
<select id="get" 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,
t2.shop_name
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 != ''">
AND
t1.shop_certification_id = #{shopCertificationId}
</if>
</select>
<!-- 店铺认证详情 -->
<select id="getBO" parameterType="map" resultMap="shopCertificationBO">
SELECT
t1.shop_certification_id,
t1.shop_id,
t1.certification_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.gmt_create,
t1.creator,
t1.gmt_modified,
t1.modifier,
t1.is_delete
FROM
svc_shop_certification t1
WHERE
t1.is_delete = 0
<if test="shopCertificationId != null and shopCertificationId != ''">
AND
t1.shop_certification_id = #{shopCertificationId}
</if>
</select>
<!-- 店铺认证详情 -->
<select id="getPO" parameterType="map" resultMap="shopCertificationPO">
SELECT
t1.shop_certification_id,
t1.shop_id,
t1.certification_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.gmt_create,
t1.creator,
t1.gmt_modified,
t1.modifier,
t1.is_delete
FROM
svc_shop_certification t1
WHERE
t1.is_delete = 0
<if test="shopCertificationId != null and shopCertificationId != ''">
AND
t1.shop_certification_id = #{shopCertificationId}
</if>
</select>
<!-- 店铺认证列表 -->
<select id="list" parameterType="map" resultMap="shopCertificationDTO">
SELECT
t1.shop_certification_id,
t1.shop_id,
t1.certification_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,
t2.shop_name
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
t2.certification_name LIKE CONCAT('%', #{keywords}, '%')
)
</if>
<if test="startTime != null and startTime != ''">
AND
LEFT(t1.gmt_create, 10) <![CDATA[ >= ]]> #{startTime}
</if>
<if test="endTime != null and endTime != ''">
AND
LEFT(t1.gmt_create, 10) <![CDATA[ <= ]]> #{endTime}
</if>
<if test="shopCertificationIds != null and shopCertificationIds.size > 0">
AND
t1.shop_certification_id IN
<foreach collection="shopCertificationIds" index="index" open="(" separator="," close=")">
#{shopCertificationIds[${index}]}
</foreach>
</if>
<if test="auditStatus != null and auditStatus != ''">
AND t1.audit_status = #{auditStatus}
</if>
ORDER BY t1.gmt_create
</select>
<!-- 店铺认证列表 -->
<select id="listBO" parameterType="map" resultMap="shopCertificationBO">
SELECT
t1.shop_certification_id,
t1.shop_id,
t1.certification_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.gmt_create,
t1.creator,
t1.gmt_modified,
t1.modifier,
t1.is_delete
FROM
svc_shop_certification t1
WHERE
t1.is_delete = 0
<if test="keywords != null and keywords != ''">
AND (
<!-- 这里添加其他条件 -->
t1.id LIKE CONCAT('%', #{keywords}, '%')
)
</if>
<if test="startTime != null and startTime != ''">
AND
LEFT(t1.gmt_create, 10) <![CDATA[ >= ]]> #{startTime}
</if>
<if test="endTime != null and endTime != ''">
AND
LEFT(t1.gmt_create, 10) <![CDATA[ <= ]]> #{endTime}
</if>
<if test="shopCertificationIds != null and shopCertificationIds.size > 0">
AND
t1.shop_certification_id IN
<foreach collection="shopCertificationIds" index="index" open="(" separator="," close=")">
#{shopCertificationIds[${index}]}
</foreach>
</if>
</select>
<!-- 店铺认证列表 -->
<select id="listPO" parameterType="map" resultMap="shopCertificationPO">
SELECT
t1.shop_certification_id,
t1.shop_id,
t1.certification_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.gmt_create,
t1.creator,
t1.gmt_modified,
t1.modifier,
t1.is_delete
FROM
svc_shop_certification t1
WHERE
t1.is_delete = 0
<if test="keywords != null and keywords != ''">
AND (
<!-- 这里添加其他条件 -->
t1.id LIKE CONCAT('%', #{keywords}, '%')
)
</if>
<if test="startTime != null and startTime != ''">
AND
LEFT(t1.gmt_create, 10) <![CDATA[ >= ]]> #{startTime}
</if>
<if test="endTime != null and endTime != ''">
AND
LEFT(t1.gmt_create, 10) <![CDATA[ <= ]]> #{endTime}
</if>
<if test="shopCertificationIds != null and shopCertificationIds.size > 0">
AND
t1.shop_certification_id IN
<foreach collection="shopCertificationIds" index="index" open="(" separator="," close=")">
#{shopCertificationIds[${index}]}
</foreach>
</if>
</select>
<!-- 店铺认证统计 -->
<select id="count" parameterType="map" resultType="Integer">
SELECT
COUNT(*)
FROM
svc_shop_certification t1
WHERE
t1.is_delete = 0
</select>
<select id="getByShopIdAndAuditStatus" parameterType="map" resultMap="shopCertificationDTO">
SELECT
t1.*
FROM
svc_shop_certification t1
WHERE
/*(t1.audit_status = 0 OR t1.audit_status = 1) AND */
t1.is_delete = 0 AND t1.shop_id = #{shopId}
</select>
</mapper>

View File

@ -267,4 +267,21 @@
t1.is_delete = 0
</select>
<select id="getByUserIdAndShopId" parameterType="map" resultMap="shopMemberDTO">
SELECT
t1.member_id,
t1.shop_id,
t1.user_id,
t1.member_level,
t1.gmt_create
FROM
svc_shop_member t1
WHERE
t1.is_delete = 0
AND
t1.user_id = #{userId} AND t1.shop_id = #{shopId}
</select>
</mapper>

View File

@ -11,6 +11,7 @@
<result column="is_leader" property="isLeader"/>
<result column="is_admin" property="isAdmin"/>
<result column="audit_status" property="auditStatus"/>
<result column="audit_result" property="auditResult"/>
<result column="gmt_create" property="gmtCreate"/>
<result column="creator" property="creator"/>
<result column="gmt_modified" property="gmtModified"/>
@ -25,6 +26,7 @@
<result column="is_leader" property="isLeader"/>
<result column="is_admin" property="isAdmin"/>
<result column="audit_status" property="auditStatus"/>
<result column="audit_result" property="auditResult"/>
<result column="gmt_create" property="gmtCreate"/>
<result column="creator" property="creator"/>
<result column="gmt_modified" property="gmtModified"/>
@ -40,6 +42,7 @@
<result column="is_leader" property="isLeader"/>
<result column="is_admin" property="isAdmin"/>
<result column="audit_status" property="auditStatus"/>
<result column="audit_result" property="auditResult"/>
<result column="gmt_create" property="gmtCreate"/>
<result column="creator" property="creator"/>
<result column="gmt_modified" property="gmtModified"/>
@ -56,6 +59,7 @@
is_leader,
is_admin,
audit_status,
audit_result,
gmt_create,
creator,
gmt_modified,
@ -69,6 +73,7 @@
#{isLeader},
#{isAdmin},
#{auditStatus},
#{auditResult},
#{gmtCreate},
#{creator},
#{gmtModified},
@ -85,7 +90,7 @@
modifier = #{modifier},
is_delete = 1
WHERE
staffIds IN
staff_id IN
<foreach collection="staffIds" index="index" open="(" separator="," close=")">
#{staffIds[${index}]}
</foreach>
@ -95,7 +100,7 @@
DELETE FROM
svc_shop_staff
WHERE
staffIds IN
staff_id IN
<foreach collection="staffIds" index="index" open="(" separator="," close=")">
#{staffIds[${index}]}
</foreach>
@ -148,12 +153,13 @@
t1.is_leader,
t1.is_admin,
t1.audit_status,
t1.audit_result,
t1.gmt_create
FROM
svc_shop_staff t1
WHERE
t1.is_delete = 0
AND staff_id = #{staffId}
AND t1.staff_id = #{staffId}
</select>
<select id="getBO" parameterType="map" resultMap="shopStaffBO">
@ -165,6 +171,7 @@
t1.is_leader,
t1.is_admin,
t1.audit_status,
t1.audit_result,
t1.gmt_create,
t1.creator,
t1.gmt_modified,
@ -174,7 +181,7 @@
svc_shop_staff t1
WHERE
t1.is_delete = 0
AND staff_id = #{staffId}
AND t1.staff_id = #{staffId}
</select>
<select id="getPO" parameterType="map" resultMap="shopStaffPO">
@ -186,6 +193,7 @@
t1.is_leader,
t1.is_admin,
t1.audit_status,
t1.audit_result,
t1.gmt_create,
t1.creator,
t1.gmt_modified,
@ -195,7 +203,7 @@
svc_shop_staff t1
WHERE
t1.is_delete = 0
AND staff_id = #{staffId}
AND t1.staff_id = #{staffId}
</select>
<select id="list" parameterType="map" resultMap="shopStaffDTO">
@ -207,6 +215,7 @@
t1.is_leader,
t1.is_admin,
t1.audit_status,
t1.audit_result,
t2.position_name
FROM
svc_shop_staff t1
@ -242,6 +251,7 @@
t1.is_leader,
t1.is_admin,
t1.audit_status,
t1.audit_result,
t1.gmt_create,
t1.creator,
t1.gmt_modified,
@ -275,6 +285,7 @@
t1.is_leader,
t1.is_admin,
t1.audit_status,
t1.audit_result,
t1.gmt_create,
t1.creator,
t1.gmt_modified,
@ -308,4 +319,23 @@
t1.is_delete = 0
</select>
<select id="getByUserIdAndShopId" parameterType="map" resultMap="shopStaffDTO">
SELECT
t1.staff_id,
t1.shop_id,
t1.user_id,
t1.position_id,
t1.is_leader,
t1.is_admin,
t1.audit_status,
t1.audit_result,
t1.gmt_create
FROM
svc_shop_staff t1
WHERE
t1.is_delete = 0
AND t1.user_id = #{userId} AND t1.shop_id = #{shopId}
</select>
</mapper>

View File

@ -32,15 +32,7 @@
</button>
</div>
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
<script type="text/html" id="barDemo">
<div class="layui-btn-group">
<button type="button" class="layui-btn" lay-event="show">详情</button>
<button type="button" class="layui-btn" lay-event="staff">人员</button>
<button type="button" class="layui-btn" lay-event="position">职位</button>
<button type="button" class="layui-btn" lay-event="member">会员</button>
</div>
</script>
</div>
</div>
@ -83,7 +75,6 @@
[
{type:'checkbox', fixed: 'left'},
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
{field:'cz', width:220, title: '操作', align:'center', toolbar: '#barDemo', fixed: 'right'},
{field: 'shopLogo', width: 180, title: '店铺LOGO', align:'center',
templet: function(row) {
var rowData = row[this.field];
@ -154,6 +145,17 @@
}
return rowData;
}
},
{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="staff">人员</button>' +
'<button type="button" class="layui-btn layui-btn-xs" lay-event="position">职位</button>' +
'<button type="button" class="layui-btn layui-btn-xs" lay-event="member">会员</button>' +
'</div>';
return rowData;
}
}
]
],

View File

@ -24,9 +24,13 @@
<form class="layui-form layui-form-pane" lay-filter="dataForm">
<div class="layui-form-item layui-form-text">
<label class="layui-form-label">店铺LOGO</label>
<div class="layui-input-block" id="logview">
<input type="hidden" id="shopLogo" name="shopLogo">
<img src="" id="showLogoImg" style="height: 100px;width: 100px;margin-left: 20px">
<div class="layui-input-block" id="logview" style="border: 1px solid #e6e6e6;">
<div class="upload-image-box">
<span class="upload-image-span">
<input type="hidden" id="shopLogo" name="shopLogo">
<img src="" id="showLogoImg" style="height: 100px;width: 100px;">
</span>
</div>
</div>
</div>
<div class="layui-form-item">
@ -35,12 +39,7 @@
<input type="text" id="shopName" name="shopName" 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">
<textarea id="shopSummary" name="shopSummary" class="layui-textarea" placeholder="请输入店铺简介" readonly="readonly"></textarea>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">店铺地址</label>
<div class="layui-input-block">
@ -61,6 +60,12 @@
</div>
</div>
</div>
<div class="layui-form-item layui-form-text">
<label class="layui-form-label">店铺简介</label>
<div class="layui-input-block">
<textarea id="shopSummary" name="shopSummary" class="layui-textarea" placeholder="请输入店铺简介" readonly="readonly"></textarea>
</div>
</div>
<div class="layui-form-item layui-layout-admin">
<div class="layui-input-block">
<div class="layui-footer" style="left: 0;">

View File

@ -0,0 +1,123 @@
<!doctype html>
<html lang="en">
<head>
<base href="/businesscard/">
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
</head>
<body>
<div class="layui-fluid layui-anim layui-anim-fadein">
<div class="layui-card">
<div class="layui-card-header">
<span class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
<a href="javascript:void(0);"><cite>认证审核</cite></a>
</span>
</div>
<div class="layui-card-body" style="padding: 15px;">
<form class="layui-form layui-form-pane" lay-filter="dataForm">
<input type="hidden" name="shopId" id="shopId" value="">
<div class="layui-form-item layui-form-text">
<label class="layui-form-label">审核意见</label>
<div class="layui-input-block">
<textarea id="auditResult" name="auditResult" class="layui-textarea" placeholder="请输入审核意见"></textarea>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">审核结果</label>
<div class="layui-input-block">
<select name="auditStatus">
<option value="1">通过</option>
<option value="-1">驳回</option>
</select>
</div>
</div>
<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" lay-submit lay-filter="submitForm">确认</button>
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<script src="assets/js/vendor/wangEditor/wangEditor.min.js"></script>
<script src="assets/js/vendor/ckplayer/ckplayer/ckplayer.js"></script>
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
<script src="assets/layuiadmin/layui/layui.js"></script>
<script>
layui.config({
base: 'assets/layuiadmin/' //静态资源所在路径
}).extend({
index: 'lib/index' //主入口模块
}).use(['index', 'form', 'laydate', 'laytpl'], function(){
var $ = layui.$;
var form = layui.form;
var laytpl = layui.laytpl;
var laydate = layui.laydate;
var shopId = top.restAjax.params(window.location.href).shopId;
function closeBox() {
parent.layer.close(parent.layer.getFrameIndex(window.name));
}
// 提交表单
form.on('submit(submitForm)', function(formData) {
top.dialog.confirm(top.dataMessage.commit, function(index) {
top.dialog.close(index);
var loadLayerIndex;
top.restAjax.post(top.restAjax.path('api/shopauditlog/save', []), formData.field, null, function(code, data) {
var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, {
time: 0,
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
shade: 0.3,
yes: function(index) {
top.dialog.close(index);
window.location.reload();
},
btn2: function() {
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);
});
});
return false;
});
$('.close').on('click', function() {
closeBox();
});
// 校验
form.verify({
});
});
</script>
</body>
</html>

View File

@ -0,0 +1,369 @@
<!doctype html>
<html lang="en">
<head>
<base href="/businesscard/">
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
</head>
<body>
<div class="layui-fluid layui-anim layui-anim-fadein">
<div class="layui-row">
<div class="layui-col-md12">
<div class="layui-card">
<div class="layui-card-body">
<div class="test-table-reload-btn" style="margin-bottom: 10px;">
<div class="layui-inline">
<input type="text" id="keywords" class="layui-input search-item" placeholder="输入关键字">
</div>
<div class="layui-inline">
<input type="text" id="startTime" class="layui-input search-item" placeholder="开始时间" readonly>
</div>
<div class="layui-inline">
<input type="text" id="endTime" class="layui-input search-item" placeholder="结束时间" readonly>
</div>
<div class="layui-inline">
<select name="auditStatus" lay-verify="required">
<option value="">全部</option>
<option value="0">未审核</option>
<option value="1">通过</option>
<option value="-1">不通过</option>
</select>
</div>
<button type="button" id="search" class="layui-btn layui-btn-sm">
<i class="fa fa-lg fa-search"></i> 搜索
</button>
</div>
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
</div>
</div>
</div>
</div>
</div>
<script src="assets/layuiadmin/layui/layui.js"></script>
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
<script>
layui.config({
base: 'assets/layuiadmin/'
}).extend({
index: 'lib/index'
}).use(['index', 'table', 'laydate', 'common'], function() {
var $ = layui.$;
var $win = $(window);
var table = layui.table;
var admin = layui.admin;
var laydate = layui.laydate;
var common = layui.common;
var resizeTimeout = null;
var tableUrl = 'api/shopcertification/listpage';
// 初始化表格
function initTable() {
table.render({
elem: '#dataTable',
id: 'dataTable',
url: top.restAjax.path(tableUrl, []),
width: admin.screen() > 1 ? '100%' : '',
height: $win.height() - 90,
limit: 20,
limits: [20, 40, 60, 80, 100, 200],
toolbar: '#headerToolBar',
request: {
pageName: 'page',
limitName: 'rows'
},
cols: [
[
{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',
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>';
setTimeout(function() {
new Viewer(document.getElementById('imgShow'+ row.shopId));
}, 50);
return value;
}
},
{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: 180, title: '企业名称', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'certificationId', width: 180, title: '统一信用代码', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{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',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'certificationCapital', width: 180, title: '企业注册资本', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'certificationFoundTime', width: 180, title: '企业注册时间', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'certificationLicenseTerm', width: 180, title: '营业期限', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'auditStatus', width: 180, 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 "不通过";
}
return rowData;
}
},
{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>' +
'<button type="button" class="layui-btn layui-btn-danger layui-btn-xs" lay-event="audit">审核</button>' +
'</div>';
return rowData;
}
}
]
],
page: true,
parseData: function(data) {
return {
'code': 0,
'msg': '',
'count': data.total,
'data': data.rows
};
}
});
}
// 重载表格
function reloadTable(currentPage) {
table.reload('dataTable', {
url: top.restAjax.path(tableUrl, []),
where: {
keywords: $('#keywords').val(),
startTime: $('#startTime').val(),
endTime: $('#endTime').val()
},
page: {
curr: currentPage
},
height: $win.height() - 90,
});
}
// 初始化日期
function initDate() {
// 日期选择
laydate.render({
elem: '#startTime',
format: 'yyyy-MM-dd'
});
laydate.render({
elem: '#endTime',
format: 'yyyy-MM-dd'
});
}
// 删除
function removeData(ids) {
top.dialog.msg(top.dataMessage.delete, {
time: 0,
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
shade: 0.3,
yes: function (index) {
top.dialog.close(index);
var layIndex;
top.restAjax.delete(top.restAjax.path('api/shopcertification/remove/{ids}', [ids]), {}, null, function (code, data) {
top.dialog.msg(top.dataMessage.deleteSuccess, {time: 1000});
reloadTable();
}, function (code, data) {
top.dialog.msg(data.msg);
}, function () {
layIndex = top.dialog.msg(top.dataMessage.deleting, {icon: 16, time: 0, shade: 0.3});
}, function () {
top.dialog.close(layIndex);
});
}
});
}
initTable();
initDate();
// 事件 - 页面变化
$win.on('resize', function() {
clearTimeout(resizeTimeout);
resizeTimeout = setTimeout(function() {
reloadTable();
}, 500);
});
// 事件 - 搜索
$(document).on('click', '#search', function() {
reloadTable(1);
});
// 事件 - 增删改
table.on('toolbar(dataTable)', function(obj) {
var layEvent = obj.event;
var checkStatus = table.checkStatus('dataTable');
var checkDatas = checkStatus.data;
if(layEvent === 'saveEvent') {
layer.open({
type: 2,
title: false,
closeBtn: 0,
area: ['100%', '100%'],
shadeClose: true,
anim: 2,
content: top.restAjax.path('route/shopcertification/save.html', []),
end: function() {
reloadTable();
}
});
} else if(layEvent === 'updateEvent') {
if(checkDatas.length === 0) {
top.dialog.msg(top.dataMessage.table.selectEdit);
} else if(checkDatas.length > 1) {
top.dialog.msg(top.dataMessage.table.selectOneEdit);
} else {
layer.open({
type: 2,
title: false,
closeBtn: 0,
area: ['100%', '100%'],
shadeClose: true,
anim: 2,
content: top.restAjax.path('route/shopcertification/update.html?shopCertificationId={shopCertificationId}', [checkDatas[0].shopCertificationId]),
end: function() {
reloadTable();
}
});
}
} else if(layEvent === 'removeEvent') {
if(checkDatas.length === 0) {
top.dialog.msg(top.dataMessage.table.selectDelete);
} else {
var ids = '';
for(var i = 0, item; item = checkDatas[i++];) {
if(i > 1) {
ids += '_';
}
ids += item['shopCertificationId'];
}
removeData(ids);
}
}
});
table.on('tool(dataTable)', function(obj) {
var data = obj.data;
var event = obj.event;
if (event === 'shop') {
layer.open({
type: 2,
title: false,
closeBtn: 0,
area: ['100%', '100%'],
shadeClose: true,
anim: 2,
content: top.restAjax.path('route/shop/show.html?shopId={shopId}', [data.shopId]),
end: function () {
reloadTable();
}
})
} else if(event === 'show'){
layer.open({
type: 2,
title: false,
closeBtn: 0,
area: ['100%', '100%'],
shadeClose: true,
anim: 2,
content: top.restAjax.path('route/shopcertification/show.html?shopCertificationId={shopCertificationId}', [data.shopCertificationId]),
end: function() {
reloadTable();
}
});
} else if(event === 'audit'){
layer.open({
type: 2,
title: false,
closeBtn: 0,
area: ['50%', '50%'],
shadeClose: true,
anim: 2,
content: top.restAjax.path('route/shopauditlog/audit.html?shopId={shopId}', [data.shopId]),
end: function() {
reloadTable();
}
});
}
});
});
</script>
</body>
</html>

View File

@ -0,0 +1,237 @@
<!doctype html>
<html lang="en">
<head>
<base href="/businesscard/">
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
</head>
<body>
<div class="layui-fluid layui-anim layui-anim-fadein">
<div class="layui-card">
<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>
</span>
</div>
<div class="layui-card-body" style="padding: 15px;">
<form class="layui-form layui-form-pane" lay-filter="dataForm">
<div class="layui-form-item">
<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">
</div>
</div>
<div class="layui-form-item">
<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">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">企业名称</label>
<div class="layui-input-block">
<input type="text" id="certificationName" name="certificationName" class="layui-input" value="" placeholder="请输入企业名称" maxlength="100">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">企业类型</label>
<div class="layui-input-block">
<input type="text" id="certificationType" name="certificationType" class="layui-input" value="" placeholder="请输入企业类型" maxlength="10">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">企业地址</label>
<div class="layui-input-block">
<input type="text" id="certificationAddress" name="certificationAddress" class="layui-input" value="" placeholder="请输入企业地址" maxlength="500">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">企业法定代表人</label>
<div class="layui-input-block">
<input type="text" id="certificationLegalPerson" name="certificationLegalPerson" class="layui-input" value="" placeholder="请输入企业法定代表人" maxlength="255">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">企业注册资本</label>
<div class="layui-input-block">
<input type="text" id="certificationCapital" name="certificationCapital" class="layui-input" value="" placeholder="请输入企业注册资本" maxlength="255">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">企业注册时间</label>
<div class="layui-input-block">
<input type="text" id="certificationFoundTime" name="certificationFoundTime" class="layui-input" value="" placeholder="请选择企业注册时间" readonly style="cursor: pointer;" lay-verify="required">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">营业期限</label>
<div class="layui-input-block">
<input type="text" id="certificationLicenseTerm" name="certificationLicenseTerm" class="layui-input" value="" placeholder="请输入营业期限" maxlength="255">
</div>
</div>
<div class="layui-form-item layui-form-text">
<label class="layui-form-label">企业经营范围</label>
<div class="layui-input-block">
<textarea id="certificationBusiness" name="certificationBusiness" class="layui-textarea" placeholder="请输入企业经营范围"></textarea>
</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">
</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">
</div>
</div>
<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" lay-submit lay-filter="submitForm">提交新增</button>
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<script src="assets/js/vendor/wangEditor/wangEditor.min.js"></script>
<script src="assets/js/vendor/ckplayer/ckplayer/ckplayer.js"></script>
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
<script src="assets/layuiadmin/layui/layui.js"></script>
<script>
layui.config({
base: 'assets/layuiadmin/' //静态资源所在路径
}).extend({
index: 'lib/index' //主入口模块
}).use(['index', 'form', 'laydate', 'laytpl'], function(){
var $ = layui.$;
var form = layui.form;
var laytpl = layui.laytpl;
var laydate = layui.laydate;
var wangEditor = window.wangEditor;
var wangEditorObj = {};
var viewerObj = {};
function closeBox() {
parent.layer.close(parent.layer.getFrameIndex(window.name));
}
function refreshDownloadTemplet(fileName, file) {
var dataRander = {};
dataRander[fileName] = file;
laytpl(document.getElementById(fileName +'FileDownload').innerHTML).render(dataRander, function(html) {
document.getElementById(fileName +'FileBox').innerHTML = html;
});
}
// 初始化文件列表
function initFileList(fileName, ids, callback) {
var dataForm = {};
dataForm[fileName] = ids;
form.val('dataForm', dataForm);
if(!ids) {
refreshDownloadTemplet(fileName, []);
if(callback) {
callback(fileName, []);
}
return;
}
top.restAjax.get(top.restAjax.path('api/file/list', []), {
ids: ids
}, null, function(code, data) {
refreshDownloadTemplet(fileName, data);
if(callback) {
callback(fileName, data);
}
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
// 初始化视频
function initVideo(fileName, data) {
for(var i = 0, item; item = data[i++];) {
var player = new ckplayer({
container: '#'+ fileName + i,
variable: 'player',
flashplayer: false,
video: {
file: 'route/file/download/true/'+ item.fileId,
type: 'video/mp4'
}
});
}
}
// 初始化企业注册时间时间戳
function initCertificationFoundTimeDateTime() {
laydate.render({
elem: '#certificationFoundTime',
type: 'datetime',
value: new Date(),
trigger: 'click'
});
}
// 初始化内容
function initData() {
initCertificationFoundTimeDateTime();
}
initData();
// 提交表单
form.on('submit(submitForm)', function(formData) {
top.dialog.confirm(top.dataMessage.commit, function(index) {
top.dialog.close(index);
var loadLayerIndex;
top.restAjax.post(top.restAjax.path('api/shopcertification/save', []), formData.field, null, function(code, data) {
var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, {
time: 0,
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
shade: 0.3,
yes: function(index) {
top.dialog.close(index);
window.location.reload();
},
btn2: function() {
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);
});
});
return false;
});
$('.close').on('click', function() {
closeBox();
});
// 校验
form.verify({
});
});
</script>
</body>
</html>

View File

@ -0,0 +1,238 @@
<!doctype html>
<html lang="en">
<head>
<base href="/businesscard/">
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
<style>
.layui-form-pane .layui-form-label{width: 130px}
.layui-form-pane .layui-input-block{margin-left: 130px;}
</style>
</head>
<body>
<div class="layui-fluid layui-anim layui-anim-fadein">
<div class="layui-card">
<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>
</span>
</div>
<div class="layui-card-body" style="padding: 15px;">
<form class="layui-form layui-form-pane" lay-filter="dataForm">
<div class="layui-form-item layui-form-text">
<label class="layui-form-label">营业执照</label>
<div class="layui-input-block" id="imageview" style="border: 1px solid #e6e6e6;">
<div class="upload-image-box">
<span class="upload-image-span">
<input type="hidden" id="certificationImage" name="certificationImage">
<img src="" id="showImg" style="height: 100px;width: 100px;">
</span>
</div>
</div>
</div>
<div class="layui-form-item">
<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">
<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>
<div class="layui-form-item layui-col-space10">
<div class="layui-col-md6">
<label class="layui-form-label">企业名称</label>
<div class="layui-input-block">
<input type="text" id="certificationName" name="certificationName" 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="certificationType" name="certificationType" class="layui-input" value="" placeholder="请输入企业类型" maxlength="10" readonly="readonly">
</div>
</div>
</div>
<div class="layui-form-item layui-col-space10">
<div class="layui-col-md6">
<label class="layui-form-label">企业法定代表人</label>
<div class="layui-input-block">
<input type="text" id="certificationLegalPerson" name="certificationLegalPerson" class="layui-input" value="" placeholder="请输入企业法定代表人" maxlength="255" readonly="readonly">
</div>
</div>
<div class="layui-col-md6">
<label class="layui-form-label">企业注册资本</label>
<div class="layui-input-block">
<input type="text" id="certificationCapital" name="certificationCapital" class="layui-input" value="" placeholder="请输入企业注册资本" maxlength="255" readonly="readonly">
</div>
</div>
</div>
<div class="layui-form-item layui-col-space10">
<div class="layui-col-md6">
<label class="layui-form-label">企业注册时间</label>
<div class="layui-input-block">
<input type="text" id="certificationFoundTime" name="certificationFoundTime" class="layui-input" value="" placeholder="请选择企业注册时间" lay-verify="required" readonly style="cursor: pointer;">
</div>
</div>
<div class="layui-col-md6">
<label class="layui-form-label">营业期限</label>
<div class="layui-input-block">
<input type="text" id="certificationLicenseTerm" name="certificationLicenseTerm" class="layui-input" value="" placeholder="请输入营业期限" maxlength="255" readonly="readonly">
</div>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">企业地址</label>
<div class="layui-input-block">
<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 layui-form-text">
<label class="layui-form-label">企业经营范围</label>
<div class="layui-input-block">
<textarea id="certificationBusiness" name="certificationBusiness" class="layui-textarea" placeholder="请输入企业经营范围" readonly="readonly"></textarea>
</div>
</div>
<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-primary close">返回上级</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<script src="assets/js/vendor/wangEditor/wangEditor.min.js"></script>
<script src="assets/js/vendor/ckplayer/ckplayer/ckplayer.js"></script>
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
<script src="assets/layuiadmin/layui/layui.js"></script>
<script>
layui.config({
base: 'assets/layuiadmin/' //静态资源所在路径
}).extend({
index: 'lib/index' //主入口模块
}).use(['index', 'form', 'laydate', 'laytpl'], function(){
var $ = layui.$;
var form = layui.form;
var laytpl = layui.laytpl;
var laydate = layui.laydate;
var shopCertificationId = top.restAjax.params(window.location.href).shopCertificationId;
var wangEditor = window.wangEditor;
var wangEditorObj = {};
var viewerObj = {};
var view = new Viewer(document.getElementById("imageview"),{});
function closeBox() {
parent.layer.close(parent.layer.getFrameIndex(window.name));
}
function refreshDownloadTemplet(fileName, file) {
var dataRander = {};
dataRander[fileName] = file;
laytpl(document.getElementById(fileName +'FileDownload').innerHTML).render(dataRander, function(html) {
document.getElementById(fileName +'FileBox').innerHTML = html;
});
}
// 初始化内容
function initData() {
var loadLayerIndex;
top.restAjax.get(top.restAjax.path('api/shopcertification/get/{shopCertificationId}', [shopCertificationId]), {}, null, function(code, data) {
var dataFormData = {};
for(var i in data) {
dataFormData[i] = data[i] +'';
}
$("#showImg").attr("src","route/file/download/true/"+data.certificationImage);
form.val('dataForm', dataFormData);
form.render(null, 'dataForm');
}, function(code, data) {
top.dialog.msg(data.msg);
}, function() {
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
}, function() {
top.dialog.close(loadLayerIndex);
});
}
initData();
// 提交表单
form.on('submit(submitForm)', function(formData) {
top.dialog.confirm(top.dataMessage.commit, function(index) {
top.dialog.close(index);
var loadLayerIndex;
top.restAjax.put(top.restAjax.path('api/shopcertification/update/{shopCertificationId}', [shopCertificationId]), formData.field, null, function(code, data) {
var layerIndex = top.dialog.msg(top.dataMessage.updateSuccess, {
time: 0,
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
shade: 0.3,
yes: function(index) {
top.dialog.close(index);
window.location.reload();
},
btn2: function() {
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);
});
});
return false;
});
$('.close').on('click', function() {
closeBox();
});
// 校验
form.verify({
});
});
</script>
</body>
</html>

View File

@ -0,0 +1,254 @@
<!doctype html>
<html lang="en">
<head>
<base href="/businesscard/">
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
</head>
<body>
<div class="layui-fluid layui-anim layui-anim-fadein">
<div class="layui-card">
<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>
</span>
</div>
<div class="layui-card-body" style="padding: 15px;">
<form class="layui-form layui-form-pane" lay-filter="dataForm">
<div class="layui-form-item">
<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">
</div>
</div>
<div class="layui-form-item">
<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">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">企业名称</label>
<div class="layui-input-block">
<input type="text" id="certificationName" name="certificationName" class="layui-input" value="" placeholder="请输入企业名称" maxlength="100">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">企业类型</label>
<div class="layui-input-block">
<input type="text" id="certificationType" name="certificationType" class="layui-input" value="" placeholder="请输入企业类型" maxlength="10">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">企业地址</label>
<div class="layui-input-block">
<input type="text" id="certificationAddress" name="certificationAddress" class="layui-input" value="" placeholder="请输入企业地址" maxlength="500">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">企业法定代表人</label>
<div class="layui-input-block">
<input type="text" id="certificationLegalPerson" name="certificationLegalPerson" class="layui-input" value="" placeholder="请输入企业法定代表人" maxlength="255">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">企业注册资本</label>
<div class="layui-input-block">
<input type="text" id="certificationCapital" name="certificationCapital" class="layui-input" value="" placeholder="请输入企业注册资本" maxlength="255">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">企业注册时间</label>
<div class="layui-input-block">
<input type="text" id="certificationFoundTime" name="certificationFoundTime" class="layui-input" value="" placeholder="请选择企业注册时间" lay-verify="required" readonly style="cursor: pointer;">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">营业期限</label>
<div class="layui-input-block">
<input type="text" id="certificationLicenseTerm" name="certificationLicenseTerm" class="layui-input" value="" placeholder="请输入营业期限" maxlength="255">
</div>
</div>
<div class="layui-form-item layui-form-text">
<label class="layui-form-label">企业经营范围</label>
<div class="layui-input-block">
<textarea id="certificationBusiness" name="certificationBusiness" class="layui-textarea" placeholder="请输入企业经营范围"></textarea>
</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">
</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">
</div>
</div>
<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" lay-submit lay-filter="submitForm">提交编辑</button>
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<script src="assets/js/vendor/wangEditor/wangEditor.min.js"></script>
<script src="assets/js/vendor/ckplayer/ckplayer/ckplayer.js"></script>
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
<script src="assets/layuiadmin/layui/layui.js"></script>
<script>
layui.config({
base: 'assets/layuiadmin/' //静态资源所在路径
}).extend({
index: 'lib/index' //主入口模块
}).use(['index', 'form', 'laydate', 'laytpl'], function(){
var $ = layui.$;
var form = layui.form;
var laytpl = layui.laytpl;
var laydate = layui.laydate;
var shopCertificationId = top.restAjax.params(window.location.href).shopCertificationId;
var wangEditor = window.wangEditor;
var wangEditorObj = {};
var viewerObj = {};
function closeBox() {
parent.layer.close(parent.layer.getFrameIndex(window.name));
}
function refreshDownloadTemplet(fileName, file) {
var dataRander = {};
dataRander[fileName] = file;
laytpl(document.getElementById(fileName +'FileDownload').innerHTML).render(dataRander, function(html) {
document.getElementById(fileName +'FileBox').innerHTML = html;
});
}
// 初始化文件列表
function initFileList(fileName, ids, callback) {
var dataForm = {};
dataForm[fileName] = ids;
form.val('dataForm', dataForm);
if(!ids) {
refreshDownloadTemplet(fileName, []);
if(callback) {
callback(fileName, []);
}
return;
}
top.restAjax.get(top.restAjax.path('api/file/list', []), {
ids: ids
}, null, function(code, data) {
refreshDownloadTemplet(fileName, data);
if(callback) {
callback(fileName, data);
}
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
// 初始化视频
function initVideo(fileName, data) {
for(var i = 0, item; item = data[i++];) {
var player = new ckplayer({
container: '#'+ fileName + i,
variable: 'player',
flashplayer: false,
video: {
file: 'route/file/download/true/'+ item.fileId,
type: 'video/mp4'
}
});
}
}
// 初始化企业注册时间时间戳
function initCertificationFoundTimeDateTime() {
laydate.render({
elem: '#certificationFoundTime',
type: 'datetime',
value: new Date(),
trigger: 'click'
});
}
// 初始化内容
function initData() {
var loadLayerIndex;
top.restAjax.get(top.restAjax.path('api/shopcertification/get/{shopCertificationId}', [shopCertificationId]), {}, null, function(code, data) {
var dataFormData = {};
for(var i in data) {
dataFormData[i] = data[i] +'';
}
form.val('dataForm', dataFormData);
form.render(null, 'dataForm');
initCertificationFoundTimeDateTime();
}, function(code, data) {
top.dialog.msg(data.msg);
}, function() {
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
}, function() {
top.dialog.close(loadLayerIndex);
});
}
initData();
// 提交表单
form.on('submit(submitForm)', function(formData) {
top.dialog.confirm(top.dataMessage.commit, function(index) {
top.dialog.close(index);
var loadLayerIndex;
top.restAjax.put(top.restAjax.path('api/shopcertification/update/{shopCertificationId}', [shopCertificationId]), formData.field, null, function(code, data) {
var layerIndex = top.dialog.msg(top.dataMessage.updateSuccess, {
time: 0,
btn: [top.dataMessage.button.yes, top.dataMessage.button.no],
shade: 0.3,
yes: function(index) {
top.dialog.close(index);
window.location.reload();
},
btn2: function() {
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);
});
});
return false;
});
$('.close').on('click', function() {
closeBox();
});
// 校验
form.verify({
});
});
</script>
</body>
</html>