bug修改,审核全局配置功能新增。

This commit is contained in:
Renpc-kilig 2021-04-08 17:04:52 +08:00
parent 7476a28c2f
commit 3482f06a32
34 changed files with 2026 additions and 65 deletions

View File

@ -0,0 +1,111 @@
package cn.com.tenlion.controller.api.deploy;
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.deploy.DeployDTO;
import cn.com.tenlion.pojo.vos.deploy.DeployVO;
import cn.com.tenlion.service.deploy.IDeployService;
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: DeployController
* @Description:
* @Author: CodeFactory
* @Date: 2021-04-07 10:53:40
* @Version: 3.0
**/
@Api(tags = ISystemConstant.API_TAGS_SYSTEM_PREFIX + "接口")
@RestController
@RequestMapping(ISystemConstant.API_PREFIX + "/deploy")
public class DeployController extends DefaultBaseController {
@Autowired
private IDeployService deployService;
@ApiOperation(value = "新增", notes = "新增接口")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PostMapping("save")
@CheckRequestBodyAnnotation
public SuccessResult save(@RequestBody DeployVO deployVO) {
deployService.save(deployVO);
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) {
deployService.remove(Arrays.asList(ids.split("\\_")));
return new SuccessResult();
}
@ApiOperation(value = "修改", notes = "修改接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "deployId", value = "ID", paramType = "path")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PutMapping("update/{deployId}")
@CheckRequestBodyAnnotation
public SuccessResult update(@PathVariable("deployId") String deployId, @RequestBody DeployVO deployVO) {
deployService.update(deployId, deployVO);
return new SuccessResult();
}
@ApiOperation(value = "详情", notes = "详情接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "deployId", value = "ID", paramType = "path")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("get/{deployId}")
public DeployDTO get(@PathVariable("deployId") String deployId) {
return deployService.get(deployId);
}
@ApiOperation(value = "列表", notes = "列表接口")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("list")
public List<DeployDTO> list() {
Map<String, Object> params = requestParams();
return deployService.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<DeployDTO>> listPage(ListPage page) {
Map<String, Object> params = requestParams();
page.setParams(params);
return deployService.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<>(deployService.count(params));
}
}

View File

@ -38,7 +38,7 @@ public class OrderDeatilController extends DefaultBaseController {
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PostMapping("save")
@CheckRequestBodyAnnotation
public SuccessResult save(@RequestBody OrderDeatilVO orderDeatilVO) {
public SuccessResult save(@RequestBody List<OrderDeatilVO> orderDeatilVO) {
orderDeatilService.save(orderDeatilVO);
return new SuccessResult();
}

View File

@ -56,13 +56,13 @@ public class TemplatePersonController extends DefaultBaseController {
@ApiOperation(value = "修改", notes = "修改接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "templatePersonId", value = "ID", paramType = "path")
@ApiImplicitParam(name = "cardPersonId", value = "ID", paramType = "path")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PutMapping("update/{templatePersonId}")
@PutMapping("update/{cardPersonId}")
@CheckRequestBodyAnnotation
public SuccessResult update(@PathVariable("templatePersonId") String templatePersonId, @RequestBody TemplatePersonVO templatePersonVO) {
templatePersonService.update(templatePersonId, templatePersonVO);
public SuccessResult update(@PathVariable("cardPersonId") String cardPersonId, @RequestBody TemplatePersonVO templatePersonVO) {
templatePersonService.update(cardPersonId, templatePersonVO);
return new SuccessResult();
}

View File

@ -26,7 +26,7 @@ import java.util.Map;
* @Date: 2021-03-23 15:40:34
* @Version: 3.0
**/
@Api(tags = ISystemConstant.API_TAGS_APP_PREFIX + "接口")
@Api(tags = ISystemConstant.API_TAGS_APP_PREFIX + "订单详情接口")
@RestController
@RequestMapping(ISystemConstant.APP_PREFIX + "/orderdeatil")
public class OrderDeatilAppController extends DefaultBaseController {
@ -41,7 +41,7 @@ public class OrderDeatilAppController extends DefaultBaseController {
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PostMapping("save")
@CheckRequestBodyAnnotation
public SuccessResult save(@RequestHeader("token") String token, @RequestBody OrderDeatilVO orderDeatilVO) {
public SuccessResult save(@RequestHeader("token") String token, @RequestBody List<OrderDeatilVO> orderDeatilVO) {
orderDeatilService.save(token, orderDeatilVO);
return new SuccessResult();
}

View File

@ -64,10 +64,10 @@ public class TemplatePersonAppController extends DefaultBaseController {
@ApiImplicitParam(name = "templatePersonId", value = "ID", paramType = "path")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PutMapping("updatetemplateperson/{templatePersonId}")
@PutMapping("updatetemplateperson/{cardPersonId}")
@CheckRequestBodyAnnotation
public SuccessResult updateTemplatePerson(@RequestHeader("token") String token, @PathVariable("templatePersonId") String templatePersonId, @RequestBody TemplatePersonVO templatePersonVO) {
templatePersonService.update(token, templatePersonId, templatePersonVO);
public SuccessResult updateTemplatePerson(@RequestHeader("token") String token, @PathVariable("cardPersonId") String cardPersonId, @RequestBody TemplatePersonVO templatePersonVO) {
templatePersonService.update(token, cardPersonId, templatePersonVO);
return new SuccessResult();
}

View File

@ -0,0 +1,120 @@
package cn.com.tenlion.dao.deploy;
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.deploy.DeployBO;
import cn.com.tenlion.pojo.pos.deploy.DeployPO;
import cn.com.tenlion.pojo.dtos.deploy.DeployDTO;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Map;
/**
* @ClassName: IDeployDao
* @Description:
* @Author: CodeFactory
* @Date: 2021-04-07 10:53:40
* @Version: 3.0
**/
@Repository
public interface IDeployDao {
/**
* 新增
*
* @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
*/
DeployDTO get(Map<String, Object> params) throws SearchException;
/**
* 详情
*
* @param params
* @return
* @throws SearchException
*/
DeployBO getBO(Map<String, Object> params) throws SearchException;
/**
* 详情
*
* @param params
* @return
* @throws SearchException
*/
DeployPO getPO(Map<String, Object> params) throws SearchException;
/**
* 列表
*
* @param params
* @return
* @throws SearchException
*/
List<DeployDTO> list(Map<String, Object> params) throws SearchException;
/**
* 列表
*
* @param params
* @return
* @throws SearchException
*/
List<DeployBO> listBO(Map<String, Object> params) throws SearchException;
/**
* 列表
*
* @param params
* @return
* @throws SearchException
*/
List<DeployPO> listPO(Map<String, Object> params) throws SearchException;
/**
* 统计
*
* @param params
* @return
* @throws SearchException
*/
Integer count(Map<String, Object> params) throws SearchException;
}

View File

@ -0,0 +1,25 @@
package cn.com.tenlion.enums;
/**
* @ClassName: DeployStatus
* @Description:
* @Author: renpc
* @Date: 2021-04-08 10:11:34
* @Version: 3.0
**/
public enum DeployStatus {
// 商品类目-后台
BACKSTAGE(0),
// 商品类目-小程序
MINI(1);
private Integer value;
private DeployStatus(Integer value) {
this.value = value;
}
public Integer getValue() {
return this.value == null ? -1 : this.value;
}
}

View File

@ -0,0 +1,87 @@
package cn.com.tenlion.pojo.bos.deploy;
/**
*
* @ClassName: DeployBO
* @Description:
* @Author: CodeFactory
* @Date: 2021-04-07 10:53:40
* @Version: 3.0
**/
public class DeployBO {
private String deployId;
private Integer type;
private Integer isOpen;
private String creator;
private String gmtCreate;
private String modifier;
private String gmtModified;
private Integer isDelete;
public String getDeployId() {
return deployId == null ? "" : deployId.trim();
}
public void setDeployId(String deployId) {
this.deployId = deployId;
}
public Integer getType() {
return type == null ? 0 : type;
}
public void setType(Integer type) {
this.type = type;
}
public Integer getIsOpen() {
return isOpen == null ? 0 : isOpen;
}
public void setIsOpen(Integer isOpen) {
this.isOpen = isOpen;
}
public String getCreator() {
return creator == null ? "" : creator.trim();
}
public void setCreator(String creator) {
this.creator = creator;
}
public String getGmtCreate() {
return gmtCreate == null ? "" : gmtCreate.trim();
}
public void setGmtCreate(String gmtCreate) {
this.gmtCreate = gmtCreate;
}
public String getModifier() {
return modifier == null ? "" : modifier.trim();
}
public void setModifier(String modifier) {
this.modifier = modifier;
}
public String getGmtModified() {
return gmtModified == null ? "" : gmtModified.trim();
}
public void setGmtModified(String gmtModified) {
this.gmtModified = gmtModified;
}
public Integer getIsDelete() {
return isDelete == null ? 0 : isDelete;
}
public void setIsDelete(Integer isDelete) {
this.isDelete = isDelete;
}
}

View File

@ -13,6 +13,7 @@ public class OrderBO {
private String orderId;
private String orderNo;
private String shopId;
private String words;
private Integer orderStatus;
private Integer isCancel;
private Double amountMoney;
@ -46,6 +47,14 @@ public class OrderBO {
this.shopId = shopId;
}
public String getWords() {
return words == null ? "" : words;
}
public void setWords(String words) {
this.words = words;
}
public Integer getOrderStatus() {
return orderStatus == null ? 0 : orderStatus;
}

View File

@ -0,0 +1,99 @@
package cn.com.tenlion.pojo.dtos.deploy;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
*
* @ClassName: DeployDTO
* @Description:
* @Author: CodeFactory
* @Date: 2021-04-07 10:53:40
* @Version: 3.0
**/
@ApiModel
public class DeployDTO {
@ApiModelProperty(name = "deployId", value = "")
private String deployId;
@ApiModelProperty(name = "type", value = "配置类型")
private Integer type;
@ApiModelProperty(name = "isOpen", value = "是否打开。0:否1:是")
private Integer isOpen;
@ApiModelProperty(name = "creator", value = "")
private String creator;
@ApiModelProperty(name = "gmtCreate", value = "")
private String gmtCreate;
@ApiModelProperty(name = "modifier", value = "")
private String modifier;
@ApiModelProperty(name = "gmtModified", value = "")
private String gmtModified;
@ApiModelProperty(name = "isDelete", value = "")
private Integer isDelete;
public String getDeployId() {
return deployId == null ? "" : deployId.trim();
}
public void setDeployId(String deployId) {
this.deployId = deployId;
}
public Integer getType() {
return type == null ? 0 : type;
}
public void setType(Integer type) {
this.type = type;
}
public Integer getIsOpen() {
return isOpen == null ? 0 : isOpen;
}
public void setIsOpen(Integer isOpen) {
this.isOpen = isOpen;
}
public String getCreator() {
return creator == null ? "" : creator.trim();
}
public void setCreator(String creator) {
this.creator = creator;
}
public String getGmtCreate() {
return gmtCreate == null ? "" : gmtCreate.trim();
}
public void setGmtCreate(String gmtCreate) {
this.gmtCreate = gmtCreate;
}
public String getModifier() {
return modifier == null ? "" : modifier.trim();
}
public void setModifier(String modifier) {
this.modifier = modifier;
}
public String getGmtModified() {
return gmtModified == null ? "" : gmtModified.trim();
}
public void setGmtModified(String gmtModified) {
this.gmtModified = gmtModified;
}
public Integer getIsDelete() {
return isDelete == null ? 0 : isDelete;
}
public void setIsDelete(Integer isDelete) {
this.isDelete = isDelete;
}
}

View File

@ -20,6 +20,10 @@ public class OrderDTO {
private String orderNo;
@ApiModelProperty(name = "shopId", value = "店铺ID")
private String shopId;
@ApiModelProperty(name = "words", value = "留言")
private String words;
@ApiModelProperty(name = "goodsId", value = "商品ID")
private String goodsId;
@ApiModelProperty(name = "orderStatus", value = "订单状态0:待付款1:交易中2:已退款3: 已完成")
private Integer orderStatus;
@ApiModelProperty(name = "isCancel", value = "是否取消0:未取消1:已取消")
@ -36,6 +40,10 @@ public class OrderDTO {
private String modifier;
@ApiModelProperty(name = "isDelete", value = "是否删除0:否1:是")
private Integer isDelete;
@ApiModelProperty(name = "shopName", value = "店铺名称")
private String shopName;
@ApiModelProperty(name = "shopLogo", value = "店铺图标")
private String shopLogo;
public String getOrderId() {
return orderId == null ? "" : orderId.trim();
@ -61,6 +69,22 @@ public class OrderDTO {
this.shopId = shopId;
}
public String getWords() {
return words == null ? "" : words;
}
public void setWords(String words) {
this.words = words;
}
public String getGoodsId() {
return goodsId == null ? "" : goodsId;
}
public void setGoodsId(String goodsId) {
this.goodsId = goodsId;
}
public Integer getOrderStatus() {
return orderStatus == null ? 0 : orderStatus;
}
@ -125,5 +149,19 @@ public class OrderDTO {
this.isDelete = isDelete;
}
public String getShopName() {
return shopName == null ? "" : shopName;
}
public void setShopName(String shopName) {
this.shopName = shopName;
}
public String getShopLogo() {
return shopLogo == null ? "" : shopLogo;
}
public void setShopLogo(String shopLogo) {
this.shopLogo = shopLogo;
}
}

View File

@ -0,0 +1,87 @@
package cn.com.tenlion.pojo.pos.deploy;
/**
*
* @ClassName: DeployPO
* @Description:
* @Author: CodeFactory
* @Date: 2021-04-07 10:53:40
* @Version: 3.0
**/
public class DeployPO {
private String deployId;
private Integer type;
private Integer isOpen;
private String creator;
private String gmtCreate;
private String modifier;
private String gmtModified;
private Integer isDelete;
public String getDeployId() {
return deployId == null ? "" : deployId.trim();
}
public void setDeployId(String deployId) {
this.deployId = deployId;
}
public Integer getType() {
return type == null ? 0 : type;
}
public void setType(Integer type) {
this.type = type;
}
public Integer getIsOpen() {
return isOpen == null ? 0 : isOpen;
}
public void setIsOpen(Integer isOpen) {
this.isOpen = isOpen;
}
public String getCreator() {
return creator == null ? "" : creator.trim();
}
public void setCreator(String creator) {
this.creator = creator;
}
public String getGmtCreate() {
return gmtCreate == null ? "" : gmtCreate.trim();
}
public void setGmtCreate(String gmtCreate) {
this.gmtCreate = gmtCreate;
}
public String getModifier() {
return modifier == null ? "" : modifier.trim();
}
public void setModifier(String modifier) {
this.modifier = modifier;
}
public String getGmtModified() {
return gmtModified == null ? "" : gmtModified.trim();
}
public void setGmtModified(String gmtModified) {
this.gmtModified = gmtModified;
}
public Integer getIsDelete() {
return isDelete == null ? 0 : isDelete;
}
public void setIsDelete(Integer isDelete) {
this.isDelete = isDelete;
}
}

View File

@ -13,6 +13,8 @@ public class OrderPO {
private String orderId;
private String orderNo;
private String shopId;
private String words;
private String goodsId;
private Integer orderStatus;
private Integer isCancel;
private Double amountMoney;
@ -46,6 +48,22 @@ public class OrderPO {
this.shopId = shopId;
}
public String getWords() {
return words == null ? "" : words;
}
public void setWords(String words) {
this.words = words;
}
public String getGoodsId() {
return goodsId == null ? "" : goodsId;
}
public void setGoodsId(String goodsId) {
this.goodsId = goodsId;
}
public Integer getOrderStatus() {
return orderStatus == null ? 0 : orderStatus;
}

View File

@ -0,0 +1,43 @@
package cn.com.tenlion.pojo.vos.deploy;
import ink.wgink.annotation.CheckEmptyAnnotation;
import ink.wgink.annotation.CheckNumberAnnotation;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
*
* @ClassName: DeployVO
* @Description:
* @Author: CodeFactory
* @Date: 2021-04-07 10:53:40
* @Version: 3.0
**/
@ApiModel
public class DeployVO {
@ApiModelProperty(name = "type", value = "配置类型")
@CheckNumberAnnotation(name = "配置类型")
private Integer type;
@ApiModelProperty(name = "isOpen", value = "是否打开。0:否1:是")
@CheckNumberAnnotation(name = "是否打开。0:否1:是")
private Integer isOpen;
public Integer getType() {
return type == null ? 0 : type;
}
public void setType(Integer type) {
this.type = type;
}
public Integer getIsOpen() {
return isOpen == null ? 0 : isOpen;
}
public void setIsOpen(Integer isOpen) {
this.isOpen = isOpen;
}
}

View File

@ -22,6 +22,10 @@ public class OrderVO {
private String orderNo;
@ApiModelProperty(name = "shopId", value = "店铺ID")
private String shopId;
@ApiModelProperty(name = "words", value = "留言")
private String words;
@ApiModelProperty(name = "goodsId", value = "商品ID")
private String goodsId;
@ApiModelProperty(name = "orderStatus", value = "订单状态0:待付款1:交易中2:已退款3: 已完成")
@CheckNumberAnnotation(name = "订单状态0:待付款1:交易中2:已退款3: 已完成")
private Integer orderStatus;
@ -69,6 +73,22 @@ public class OrderVO {
this.shopId = shopId;
}
public String getWords() {
return words == null ? "" : words;
}
public void setWords(String words) {
this.words = words;
}
public String getGoodsId() {
return goodsId == null ? "" : goodsId;
}
public void setGoodsId(String goodsId) {
this.goodsId = goodsId;
}
public Integer getOrderStatus() {
return orderStatus == null ? 0 : orderStatus;
}

View File

@ -18,6 +18,8 @@ public class OrderDeatilVO {
@ApiModelProperty(name = "orderId", value = "订单ID")
private String orderId;
@ApiModelProperty(name = "shopId", value = "店铺ID")
private String shopId;
@ApiModelProperty(name = "goodsName", value = "商品名称")
private String goodsName;
@ApiModelProperty(name = "goodsLogo", value = "商品logo")
@ -33,6 +35,8 @@ public class OrderDeatilVO {
@ApiModelProperty(name = "totalPrice", value = "总价")
@CheckNumberAnnotation(name = "总价")
private Double totalPrice;
@ApiModelProperty(name = "words", value = "留言")
private String words;
public String getOrderId() {
return orderId == null ? "" : orderId.trim();
@ -42,6 +46,14 @@ public class OrderDeatilVO {
this.orderId = orderId;
}
public String getShopId() {
return shopId == null ? "" : shopId;
}
public void setShopId(String shopId) {
this.shopId = shopId;
}
public String getGoodsName() {
return goodsName == null ? "" : goodsName.trim();
}
@ -90,5 +102,11 @@ public class OrderDeatilVO {
this.totalPrice = totalPrice;
}
public String getWords() {
return words == null ? "" : words;
}
public void setWords(String words) {
this.words = words;
}
}

View File

@ -1,7 +1,9 @@
package cn.com.tenlion.service.category.impl;
import cn.com.tenlion.accesstokenmanager.AccessTokenManager;
import cn.com.tenlion.dao.deploy.IDeployDao;
import cn.com.tenlion.pojo.dtos.carduser.CardUserDTO;
import cn.com.tenlion.pojo.dtos.deploy.DeployDTO;
import cn.com.tenlion.pojo.dtos.industry.IndustryDTO;
import cn.com.tenlion.pojo.dtos.industry.IndustryZTreeDTO;
import cn.com.tenlion.service.AbstractService;
@ -9,6 +11,7 @@ import cn.com.tenlion.service.industry.IIndustryService;
import com.alibaba.excel.util.StringUtils;
import ink.wgink.app.AppTokenManager;
import ink.wgink.exceptions.RemoveException;
import ink.wgink.exceptions.SaveException;
import ink.wgink.exceptions.SearchException;
import cn.com.tenlion.pojo.dtos.category.CategoryDTO;
import cn.com.tenlion.pojo.vos.category.CategoryVO;
@ -44,6 +47,8 @@ public class CategoryServiceImpl extends AbstractService implements ICategorySer
private ICategoryDao categoryDao;
@Autowired
private IIndustryService industryService;
@Autowired
private IDeployDao deployDao;
@Override
public SuccessResult saveCategory(CategoryVO categoryVO) throws Exception {
@ -114,9 +119,24 @@ public class CategoryServiceImpl extends AbstractService implements ICategorySer
setSaveInfo(params);
}
// 判断来源如果为后台则默认通过审核并且审核员为管理员
if("backstage".equals(categoryVO.getFrom())) {
params.put("auditStatus", 1);
// 用于查询配置的Map
Map<String, Object> newParams = new HashMap<>(1);
// 判断token是否为空为空则是后台录入不为空则是小程序录入
newParams.put("type", null == token ? 0 : 1);
// 通过type去获取相关的配置
List<DeployDTO> deployDTOS = deployDao.list(newParams);
// 判断配置数据是否存在不存在则返回保存错误信息提示进行配置
if(null != deployDTOS && deployDTOS.size() > 0) {
// 如果配置程序为开则需要审核
if(1 == deployDTOS.get(0).getIsOpen()) {
params.put("auditStatus", 0);
}
// 如果配置程序为关则不需要审核
if(0 == deployDTOS.get(0).getIsOpen()) {
params.put("auditStatus", 1);
}
}else {
throw new SaveException("未查询到配置相关信息");
}
// 由于项目初期只有一个系统管理员则审核ID默认为管理员ID

View File

@ -0,0 +1,188 @@
package cn.com.tenlion.service.deploy;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.SuccessResultList;
import cn.com.tenlion.pojo.dtos.deploy.DeployDTO;
import cn.com.tenlion.pojo.vos.deploy.DeployVO;
import cn.com.tenlion.pojo.bos.deploy.DeployBO;
import cn.com.tenlion.pojo.pos.deploy.DeployPO;
import java.util.List;
import java.util.Map;
/**
* @ClassName: IDeployService
* @Description:
* @Author: CodeFactory
* @Date: 2021-04-07 10:53:40
* @Version: 3.0
**/
public interface IDeployService {
/**
* 新增
*
* @param deployVO
* @return
*/
void save(DeployVO deployVO);
/**
* 新增
*
* @param token
* @param deployVO
* @return
*/
void save(String token, DeployVO deployVO);
/**
* 新增
*
* @param deployVO
* @return deployId
*/
String saveReturnId(DeployVO deployVO);
/**
* 新增
*
* @param token
* @param deployVO
* @return deployId
*/
String saveReturnId(String token, DeployVO deployVO);
/**
* 删除
*
* @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 deployId
* @param deployVO
* @return
*/
void update(String deployId, DeployVO deployVO);
/**
* 修改
*
* @param token
* @param deployId
* @param deployVO
* @return
*/
void update(String token, String deployId, DeployVO deployVO);
/**
* 详情
*
* @param params 参数Map
* @return
*/
DeployDTO get(Map<String, Object> params);
/**
* 详情
*
* @param deployId
* @return
*/
DeployDTO get(String deployId);
/**
* 详情
*
* @param params 参数Map
* @return
*/
DeployBO getBO(Map<String, Object> params);
/**
* 详情
*
* @param deployId
* @return
*/
DeployBO getBO(String deployId);
/**
* 详情
*
* @param params 参数Map
* @return
*/
DeployPO getPO(Map<String, Object> params);
/**
* 详情
*
* @param deployId
* @return
*/
DeployPO getPO(String deployId);
/**
* 列表
*
* @param params
* @return
*/
List<DeployDTO> list(Map<String, Object> params);
/**
* 列表
*
* @param params
* @return
*/
List<DeployBO> listBO(Map<String, Object> params);
/**
* 列表
*
* @param params
* @return
*/
List<DeployPO> listPO(Map<String, Object> params);
/**
* 分页列表
*
* @param page
* @return
*/
SuccessResultList<List<DeployDTO>> listPage(ListPage page);
/**
* 统计
*
* @param params
* @return
*/
Integer count(Map<String, Object> params);
}

View File

@ -0,0 +1,171 @@
package cn.com.tenlion.service.deploy.impl;
import ink.wgink.common.base.DefaultBaseService;
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.deploy.IDeployDao;
import cn.com.tenlion.pojo.dtos.deploy.DeployDTO;
import cn.com.tenlion.pojo.vos.deploy.DeployVO;
import cn.com.tenlion.pojo.bos.deploy.DeployBO;
import cn.com.tenlion.pojo.pos.deploy.DeployPO;
import cn.com.tenlion.service.deploy.IDeployService;
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: DeployServiceImpl
* @Description:
* @Author: CodeFactory
* @Date: 2021-04-07 10:53:40
* @Version: 3.0
**/
@Service
public class DeployServiceImpl extends DefaultBaseService implements IDeployService {
@Autowired
private IDeployDao deployDao;
@Override
public void save(DeployVO deployVO) {
saveReturnId(deployVO);
}
@Override
public void save(String token, DeployVO deployVO) {
saveReturnId(token, deployVO);
}
@Override
public String saveReturnId(DeployVO deployVO) {
return saveReturnId(null, deployVO);
}
@Override
public String saveReturnId(String token, DeployVO deployVO) {
String deployId = UUIDUtil.getUUID();
Map<String, Object> params = HashMapUtil.beanToMap(deployVO);
params.put("deployId", deployId);
if (StringUtils.isBlank(token)) {
setSaveInfo(params);
} else {
setAppSaveInfo(token, params);
}
deployDao.save(params);
return deployId;
}
@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("deployIds", ids);
if (StringUtils.isBlank(token)) {
setUpdateInfo(params);
} else {
setAppUpdateInfo(token, params);
}
deployDao.remove(params);
}
@Override
public void delete(List<String> ids) {
Map<String, Object> params = getHashMap(2);
params.put("deployIds", ids);
deployDao.delete(params);
}
@Override
public void update(String deployId, DeployVO deployVO) {
update(null, deployId, deployVO);
}
@Override
public void update(String token, String deployId, DeployVO deployVO) {
Map<String, Object> params = HashMapUtil.beanToMap(deployVO);
params.put("deployId", deployId);
if (StringUtils.isBlank(token)) {
setUpdateInfo(params);
} else {
setAppUpdateInfo(token, params);
}
deployDao.update(params);
}
@Override
public DeployDTO get(Map<String, Object> params) {
return deployDao.get(params);
}
@Override
public DeployDTO get(String deployId) {
Map<String, Object> params = super.getHashMap(2);
params.put("deployId", deployId);
return get(params);
}
@Override
public DeployBO getBO(Map<String, Object> params) {
return deployDao.getBO(params);
}
@Override
public DeployBO getBO(String deployId) {
Map<String, Object> params = super.getHashMap(2);
params.put("deployId", deployId);
return getBO(params);
}
@Override
public DeployPO getPO(Map<String, Object> params) {
return deployDao.getPO(params);
}
@Override
public DeployPO getPO(String deployId) {
Map<String, Object> params = super.getHashMap(2);
params.put("deployId", deployId);
return getPO(params);
}
@Override
public List<DeployDTO> list(Map<String, Object> params) {
return deployDao.list(params);
}
@Override
public List<DeployBO> listBO(Map<String, Object> params) {
return deployDao.listBO(params);
}
@Override
public List<DeployPO> listPO(Map<String, Object> params) {
return deployDao.listPO(params);
}
@Override
public SuccessResultList<List<DeployDTO>> listPage(ListPage page) {
PageHelper.startPage(page.getPage(), page.getRows());
List<DeployDTO> deployDTOs = list(page.getParams());
PageInfo<DeployDTO> pageInfo = new PageInfo<>(deployDTOs);
return new SuccessResultList<>(deployDTOs, pageInfo.getPageNum(), pageInfo.getTotal());
}
@Override
public Integer count(Map<String, Object> params) {
Integer count = deployDao.count(params);
return count == null ? 0 : count;
}
}

View File

@ -25,7 +25,7 @@ public interface IOrderDeatilService {
* @param orderDeatilVO
* @return
*/
void save(OrderDeatilVO orderDeatilVO);
void save(List<OrderDeatilVO> orderDeatilVO);
/**
* 新增
@ -34,7 +34,7 @@ public interface IOrderDeatilService {
* @param orderDeatilVO
* @return
*/
void save(String token, OrderDeatilVO orderDeatilVO);
void save(String token, List<OrderDeatilVO> orderDeatilVO);
/**
* 新增
@ -42,7 +42,7 @@ public interface IOrderDeatilService {
* @param orderDeatilVO
* @return orderDeatilId
*/
String saveReturnId(OrderDeatilVO orderDeatilVO);
String saveReturnId(List<OrderDeatilVO> orderDeatilVO);
/**
* 新增
@ -51,7 +51,7 @@ public interface IOrderDeatilService {
* @param orderDeatilVO
* @return orderDeatilId
*/
String saveReturnId(String token, OrderDeatilVO orderDeatilVO);
String saveReturnId(String token, List<OrderDeatilVO> orderDeatilVO);
/**
* 删除

View File

@ -4,9 +4,12 @@ import cn.com.tenlion.dao.orderdeatil.IOrderDeatilDao;
import cn.com.tenlion.pojo.bos.orderdeatil.OrderDeatilBO;
import cn.com.tenlion.pojo.dtos.orderdeatil.OrderDeatilDTO;
import cn.com.tenlion.pojo.pos.orderdeatil.OrderDeatilPO;
import cn.com.tenlion.pojo.vos.order.OrderVO;
import cn.com.tenlion.pojo.vos.orderdeatil.OrderDeatilVO;
import cn.com.tenlion.service.order.IOrderService;
import cn.com.tenlion.service.orderdeatil.IOrderDeatilService;
import ink.wgink.common.base.DefaultBaseService;
import ink.wgink.exceptions.SaveException;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.SuccessResultList;
import ink.wgink.util.map.HashMapUtil;
@ -31,34 +34,52 @@ public class OrderDeatilServiceImpl extends DefaultBaseService implements IOrder
@Autowired
private IOrderDeatilDao orderDeatilDao;
@Autowired
private IOrderService orderService;
@Override
public void save(OrderDeatilVO orderDeatilVO) {
public void save(List<OrderDeatilVO> orderDeatilVO) {
saveReturnId(orderDeatilVO);
}
@Override
public void save(String token, OrderDeatilVO orderDeatilVO) {
public void save(String token, List<OrderDeatilVO> orderDeatilVO) {
saveReturnId(token, orderDeatilVO);
}
@Override
public String saveReturnId(OrderDeatilVO orderDeatilVO) {
public String saveReturnId(List<OrderDeatilVO> orderDeatilVO) {
return saveReturnId(null, orderDeatilVO);
}
@Override
public String saveReturnId(String token, OrderDeatilVO orderDeatilVO) {
String orderDeatilId = UUIDUtil.getUUID();
Map<String, Object> params = HashMapUtil.beanToMap(orderDeatilVO);
params.put("orderDeatilId", orderDeatilId);
if (StringUtils.isBlank(token)) {
setSaveInfo(params);
} else {
setAppSaveInfo(token, params);
public String saveReturnId(String token, List<OrderDeatilVO> orderDeatilVO) {
String orderId = UUIDUtil.getUUID();
Map<String, Object> params = new HashMap<>();
if(null != orderDeatilVO && orderDeatilVO.size() > 0) {
double amountMoney = 0;
for(OrderDeatilVO vo: orderDeatilVO) {
amountMoney += vo.getTotalPrice();
params = HashMapUtil.beanToMap(vo);
String orderDeatilId = UUIDUtil.getUUID();
params.put("orderDeatilId", orderDeatilId);
params.put("orderId", orderId);
if (StringUtils.isBlank(token)) {
setSaveInfo(params);
} else {
setAppSaveInfo(token, params);
}
orderDeatilDao.save(params);
}
OrderVO orderVO = new OrderVO();
orderVO.setOrderId(orderId);
orderVO.setShopId(orderDeatilVO.get(0).getShopId());
orderVO.setAmountMoney(amountMoney);
orderVO.setWords(orderDeatilVO.get(0).getWords());
orderService.save(token, orderVO);
return orderId;
}
orderDeatilDao.save(params);
return orderDeatilId;
throw new SaveException("下单失败");
}
@Override

View File

@ -81,21 +81,21 @@ public interface ITemplatePersonService {
/**
* 修改
*
* @param templatePersonId
* @param cardPersonId
* @param templatePersonVO
* @return
*/
void update(String templatePersonId, TemplatePersonVO templatePersonVO);
void update(String cardPersonId, TemplatePersonVO templatePersonVO);
/**
* 修改
*
* @param token
* @param templatePersonId
* @param cardPersonId
* @param templatePersonVO
* @return
*/
void update(String token, String templatePersonId, TemplatePersonVO templatePersonVO);
void update(String token, String cardPersonId, TemplatePersonVO templatePersonVO);
/**
* 详情

View File

@ -96,14 +96,20 @@ public class TemplatePersonServiceImpl extends DefaultBaseService implements ITe
}
@Override
public void update(String templatePersonId, TemplatePersonVO templatePersonVO) {
update(null, templatePersonId, templatePersonVO);
public void update(String cardPersonId, TemplatePersonVO templatePersonVO) {
update(null, cardPersonId, templatePersonVO);
}
@Override
public void update(String token, String templatePersonId, TemplatePersonVO templatePersonVO) {
public void update(String token, String cardPersonId, TemplatePersonVO templatePersonVO) {
String content = templatePersonVO.getContent();
try {
JSONArray.parseArray(content);
}catch(Exception e) {
throw new SearchException("内容数据格式错位应为JSONArray格式");
}
Map<String, Object> params = HashMapUtil.beanToMap(templatePersonVO);
params.put("templatePersonId", templatePersonId);
params.put("cardPersonId", cardPersonId);
if (StringUtils.isBlank(token)) {
setUpdateInfo(params);
} else {

View File

@ -0,0 +1,301 @@
<?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.deploy.IDeployDao">
<resultMap id="deployDTO" type="cn.com.tenlion.pojo.dtos.deploy.DeployDTO">
<result column="deploy_id" property="deployId"/>
<result column="type" property="type"/>
<result column="is_open" property="isOpen"/>
<result column="creator" property="creator"/>
<result column="gmt_create" property="gmtCreate"/>
<result column="modifier" property="modifier"/>
<result column="gmt_modified" property="gmtModified"/>
<result column="is_delete" property="isDelete"/>
</resultMap>
<resultMap id="deployBO" type="cn.com.tenlion.pojo.bos.deploy.DeployBO">
<result column="deploy_id" property="deployId"/>
<result column="type" property="type"/>
<result column="is_open" property="isOpen"/>
<result column="creator" property="creator"/>
<result column="gmt_create" property="gmtCreate"/>
<result column="modifier" property="modifier"/>
<result column="gmt_modified" property="gmtModified"/>
<result column="is_delete" property="isDelete"/>
</resultMap>
<resultMap id="deployPO" type="cn.com.tenlion.pojo.pos.deploy.DeployPO">
<result column="deploy_id" property="deployId"/>
<result column="type" property="type"/>
<result column="is_open" property="isOpen"/>
<result column="creator" property="creator"/>
<result column="gmt_create" property="gmtCreate"/>
<result column="modifier" property="modifier"/>
<result column="gmt_modified" property="gmtModified"/>
<result column="is_delete" property="isDelete"/>
</resultMap>
<!-- 新增 -->
<insert id="save" parameterType="map">
INSERT IGNORE INTO svc_deploy(
deploy_id,
type,
is_open,
creator,
gmt_create,
modifier,
gmt_modified,
is_delete
) SELECT
#{deployId},
#{type},
#{isOpen},
#{creator},
#{gmtCreate},
#{modifier},
#{gmtModified},
#{isDelete}
FROM
DUAL
WHERE
NOT EXISTS (
SELECT
*
FROM
svc_deploy
WHERE
type = #{type}
AND is_delete = 0
)
</insert>
<!-- 删除 -->
<update id="remove" parameterType="map">
UPDATE
svc_deploy
SET
gmt_modified = #{gmtModified},
modifier = #{modifier},
is_delete = 1
WHERE
deploy_id IN
<foreach collection="deployIds" index="index" open="(" separator="," close=")">
#{deployIds[${index}]}
</foreach>
</update>
<!-- 删除(物理) -->
<update id="delete" parameterType="map">
DELETE FROM
svc_deploy
WHERE
deploy_id IN
<foreach collection="deployIds" index="index" open="(" separator="," close=")">
#{deployIds[${index}]}
</foreach>
</update>
<!-- 修改 -->
<update id="update" parameterType="map">
UPDATE
svc_deploy
SET
<if test="type != null">
type = #{type},
</if>
<if test="isOpen != null">
is_open = #{isOpen},
</if>
gmt_modified = #{gmtModified},
modifier = #{modifier},
deploy_id = deploy_id
WHERE
deploy_id = #{deployId}
</update>
<!-- 详情 -->
<select id="get" parameterType="map" resultMap="deployDTO">
SELECT
t1.type,
t1.is_open,
t1.deploy_id
FROM
svc_deploy t1
WHERE
t1.is_delete = 0
<if test="deployId != null and deployId != ''">
AND
t1.deploy_id = #{deployId}
</if>
</select>
<!-- 详情 -->
<select id="getBO" parameterType="map" resultMap="deployBO">
SELECT
t1.deploy_id,
t1.type,
t1.is_open,
t1.creator,
t1.gmt_create,
t1.modifier,
t1.gmt_modified,
t1.is_delete
FROM
svc_deploy t1
WHERE
t1.is_delete = 0
<if test="deployId != null and deployId != ''">
AND
t1.deploy_id = #{deployId}
</if>
</select>
<!-- 详情 -->
<select id="getPO" parameterType="map" resultMap="deployPO">
SELECT
t1.deploy_id,
t1.type,
t1.is_open,
t1.creator,
t1.gmt_create,
t1.modifier,
t1.gmt_modified,
t1.is_delete
FROM
svc_deploy t1
WHERE
t1.is_delete = 0
<if test="deployId != null and deployId != ''">
AND
t1.deploy_id = #{deployId}
</if>
</select>
<!-- 列表 -->
<select id="list" parameterType="map" resultMap="deployDTO">
SELECT
t1.deploy_id,
t1.type,
t1.is_open,
t1.creator,
t1.gmt_create,
t1.modifier,
t1.gmt_modified,
t1.is_delete,
1
FROM
svc_deploy t1
WHERE
t1.is_delete = 0
<if test="type != null" >
AND t1.type = #{type}
</if>
<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="deployIds != null and deployIds.size > 0">
AND
t1.deploy_id IN
<foreach collection="deployIds" index="index" open="(" separator="," close=")">
#{deployIds[${index}]}
</foreach>
</if>
</select>
<!-- 列表 -->
<select id="listBO" parameterType="map" resultMap="deployBO">
SELECT
t1.deploy_id,
t1.type,
t1.is_open,
t1.creator,
t1.gmt_create,
t1.modifier,
t1.gmt_modified,
t1.is_delete
FROM
svc_deploy 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="deployIds != null and deployIds.size > 0">
AND
t1.deploy_id IN
<foreach collection="deployIds" index="index" open="(" separator="," close=")">
#{deployIds[${index}]}
</foreach>
</if>
</select>
<!-- 列表 -->
<select id="listPO" parameterType="map" resultMap="deployPO">
SELECT
t1.deploy_id,
t1.type,
t1.is_open,
t1.creator,
t1.gmt_create,
t1.modifier,
t1.gmt_modified,
t1.is_delete
FROM
svc_deploy 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="deployIds != null and deployIds.size > 0">
AND
t1.deploy_id IN
<foreach collection="deployIds" index="index" open="(" separator="," close=")">
#{deployIds[${index}]}
</foreach>
</if>
</select>
<!-- 统计 -->
<select id="count" parameterType="map" resultType="Integer">
SELECT
COUNT(*)
FROM
svc_deploy t1
WHERE
t1.is_delete = 0
</select>
</mapper>

View File

@ -6,6 +6,7 @@
<result column="order_id" property="orderId"/>
<result column="order_no" property="orderNo"/>
<result column="shop_id" property="shopId"/>
<result column="words" property="words"/>
<result column="order_status" property="orderStatus"/>
<result column="is_cancel" property="isCancel"/>
<result column="amount_money" property="amountMoney"/>
@ -14,12 +15,15 @@
<result column="gmt_modified" property="gmtModified"/>
<result column="modifier" property="modifier"/>
<result column="is_delete" property="isDelete"/>
<result column="shop_name" property="shopName"/>
<result column="shop_logo" property="shopLogo"/>
</resultMap>
<resultMap id="orderBO" type="cn.com.tenlion.pojo.bos.order.OrderBO">
<result column="order_id" property="orderId"/>
<result column="order_no" property="orderNo"/>
<result column="shop_id" property="shopId"/>
<result column="words" property="words"/>
<result column="order_status" property="orderStatus"/>
<result column="is_cancel" property="isCancel"/>
<result column="amount_money" property="amountMoney"/>
@ -34,6 +38,7 @@
<result column="order_id" property="orderId"/>
<result column="order_no" property="orderNo"/>
<result column="shop_id" property="shopId"/>
<result column="words" property="words"/>
<result column="order_status" property="orderStatus"/>
<result column="is_cancel" property="isCancel"/>
<result column="amount_money" property="amountMoney"/>
@ -50,6 +55,7 @@
order_id,
order_no,
shop_id,
words,
order_status,
is_cancel,
amount_money,
@ -62,6 +68,7 @@
#{orderId},
#{orderNo},
#{shopId},
#{words},
#{orderStatus},
#{isCancel},
#{amountMoney},
@ -113,6 +120,9 @@
<if test="shopId != null and shopId != ''">
shop_id = #{shopId},
</if>
<if test="words != null and words != ''">
words = #{words},
</if>
<if test="orderStatus != null">
order_status = #{orderStatus},
</if>
@ -147,6 +157,7 @@
t1.order_id,
t1.order_no,
t1.shop_id,
t1.words,
t1.order_status,
t1.is_cancel,
t1.amount_money,
@ -172,6 +183,7 @@
t1.order_id,
t1.order_no,
t1.shop_id,
t1.words,
t1.order_status,
t1.is_cancel,
t1.amount_money,
@ -196,6 +208,7 @@
t1.order_id,
t1.order_no,
t1.shop_id,
t1.words,
t1.order_status,
t1.is_cancel,
t1.amount_money,
@ -217,25 +230,26 @@
<!-- 列表 -->
<select id="list" parameterType="map" resultMap="orderDTO">
SELECT
t1.order_id,
t1.order_no,
t1.shop_id,
t1.order_status,
t1.is_cancel,
t1.amount_money,
t1.gmt_create,
t1.creator,
t1.gmt_modified,
t1.modifier,
t1.is_delete,
1
t1.order_id,
t1.order_no,
t1.shop_id,
t1.words,
t1.order_status,
t1.is_cancel,
t1.amount_money,
t1.gmt_create,
t1.creator,
t1.gmt_modified,
t1.modifier,
t1.is_delete,
t2.shop_name,
t2.shop_logo
FROM
svc_order t1
svc_order t1 LEFT JOIN svc_shop t2 ON t1.shop_id = t2.shop_id AND t2.is_delete = 0
WHERE
t1.is_delete = 0
t1.is_delete = 0
<if test="keywords != null and keywords != ''">
AND (
<!-- 这里添加其他条件 -->
t1.id LIKE CONCAT('%', #{keywords}, '%')
)
</if>
@ -262,6 +276,7 @@
t1.order_id,
t1.order_no,
t1.shop_id,
t1.words,
t1.order_status,
t1.is_cancel,
t1.amount_money,
@ -303,6 +318,7 @@
t1.order_id,
t1.order_no,
t1.shop_id,
t1.words,
t1.order_status,
t1.is_cancel,
t1.amount_money,

View File

@ -125,11 +125,11 @@
<if test="modifier != null and modifier != ''">
modifier = #{modifier},
</if>
<if test="gmtModified != null and gmtModified != ''">
gmt_modified = #{gmtModified},
</if>
<if test="isDelete != null">
is_delete = #{isDelete}
is_delete = #{isDelete},
</if>
<if test="gmtModified != null and gmtModified != ''">
gmt_modified = #{gmtModified}
</if>
WHERE
card_person_id = #{cardPersonId}

View File

@ -11,7 +11,7 @@
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
</head>
<body>
<div class="layui-fluid layui-anim layui-anim-fadein">
<div class="layui-anim layui-anim-fadein">
<div class="layui-row">
<div class="layui-col-md12">
<div class="layui-card">
@ -158,7 +158,7 @@
return rowData;
}
},
{field: 'auditStatus', width: 150, title: '审核状态', align:'center',
{field: 'auditStatus', fixed: 'right', width: 150, title: '审核状态', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {

View File

@ -35,9 +35,9 @@
<input type="text" id="categoryName" name="categoryName" class="layui-input" value="" placeholder="请输入商品类别名称" lay-verify="required">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label" style="width: 120px;">商品类别说明</label>
<div class="layui-input-block" style="margin-left: 120px;">
<div class="layui-form-item layui-form-text">
<label class="layui-form-label">商品类别说明</label>
<div class="layui-input-block">
<textarea id="categorySummary" name="categorySummary" class="layui-textarea" placeholder="请输入商品类别说明"></textarea>
</div>
</div>

View File

@ -0,0 +1,291 @@
<!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">
</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>
<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>
<!-- 表头按钮组 -->
<script type="text/html" id="headerToolBar">
<div class="layui-btn-group">
<button type="button" class="layui-btn layui-btn-sm" lay-event="saveEvent">
<i class="fa fa-lg fa-plus"></i> 新增
</button>
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="updateEvent">
<i class="fa fa-lg fa-edit"></i> 编辑
</button>
<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="removeEvent">
<i class="fa fa-lg fa-trash"></i> 删除
</button>
</div>
</script>
</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/deploy/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: 'deployId', width: 180, title: '', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'type', width: 180, title: '配置类型', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'isOpen', width: 180, title: '是否打开。0:否1:是', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'creator', width: 180, title: '', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'gmtCreate', width: 180, title: '', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'modifier', width: 180, title: '', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'gmtModified', width: 180, title: '', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'isDelete', width: 180, title: '', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
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/deploy/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/deploy/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/deploy/update.html?deployId={deployId}', [checkDatas[0].deployId]),
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['deployId'];
}
removeData(ids);
}
}
});
});
</script>
</body>
</html>

View File

@ -0,0 +1,126 @@
<!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 layui-form">
<select name="type" lay-filter="type">
<option value="">请选择设置类型</option>
<option value="0">商品类目-小程序</option>
<option value="1">商品类目-后台</option>
</select>
</div>
</div>
<div class="layui-form-item" pane>
<label class="layui-form-label">是否打开</label>
<div class="layui-input-block">
<input type="checkbox" name="isOpen" lay-skin="switch" lay-text="开|关">
</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 initData() {
}
initData();
// 提交表单
form.on('submit(submitForm)', function(formData) {
// off关、on开
// 0关、1开
if(formData.field.isOpen != 'on') {
formData.field.isOpen = '0'
}else {
formData.field.isOpen = '1'
}
top.dialog.confirm(top.dataMessage.commit, function(index) {
top.dialog.close(index);
var loadLayerIndex;
top.restAjax.post(top.restAjax.path('api/deploy/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,146 @@
<!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 layui-form">
<select name="type" lay-filter="type">
<option value="">请选择设置类型</option>
<option value="0">商品类目-小程序</option>
<option value="1">商品类目-后台</option>
</select>
</div>
</div>
<div class="layui-form-item" pane>
<label class="layui-form-label">是否打开。0:否1:是</label>
<div class="layui-input-block">
<input type="checkbox" name="isOpen" lay-skin="switch" lay-text="开|关">
</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 deployId = top.restAjax.params(window.location.href).deployId;
var wangEditor = window.wangEditor;
var wangEditorObj = {};
var viewerObj = {};
function closeBox() {
parent.layer.close(parent.layer.getFrameIndex(window.name));
}
// 初始化内容
function initData() {
var loadLayerIndex;
top.restAjax.get(top.restAjax.path('api/deploy/get/{deployId}', [deployId]), {}, null, function(code, data) {
var dataFormData = {};
for(var i in data) {
dataFormData[i] = data[i] +'';
}
if(dataFormData.isOpen == '1') {
dataFormData.isOpen = 'on'
}else {
dataFormData.isOpen = ''
}
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) {
if(formData.field.isOpen != 'on') {
formData.field.isOpen = '0'
}else {
formData.field.isOpen = '1'
}
top.dialog.confirm(top.dataMessage.commit, function(index) {
top.dialog.close(index);
var loadLayerIndex;
top.restAjax.put(top.restAjax.path('api/deploy/update/{deployId}', [deployId]), 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

@ -11,7 +11,7 @@
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
</head>
<body>
<div class="layui-fluid layui-anim layui-anim-fadein">
<div class="layui-anim layui-anim-fadein">
<div class="layui-row">
<div class="layui-col-md12">
<div class="layui-card">

View File

@ -28,7 +28,7 @@
<input type="text" id="goodsName" name="goodsName" class="layui-input" value="" placeholder="请输入商品名称" maxlength="255">
</div>
</div>
<div class="layui-form-item">
<div class="layui-form-item layui-form-text">
<label class="layui-form-label">商品说明</label>
<div class="layui-input-block">
<textarea id="goodsSummary" name="goodsSummary" class="layui-textarea" placeholder="请输入商品说明" maxlength="500"></textarea>

View File

@ -28,7 +28,7 @@
<input type="text" id="goodsName" name="goodsName" class="layui-input" value="" placeholder="请输入商品名称" maxlength="255">
</div>
</div>
<div class="layui-form-item">
<div class="layui-form-item layui-form-text">
<label class="layui-form-label">商品说明</label>
<div class="layui-input-block">
<textarea id="goodsSummary" name="goodsSummary" class="layui-textarea" placeholder="请输入商品说明" maxlength="500"></textarea>