店铺详情页功能
This commit is contained in:
parent
e33fa4ea3a
commit
7a43d9a7d6
@ -34,6 +34,26 @@ public class ShopMemberController extends DefaultBaseController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IShopMemberService shopMemberService;
|
private IShopMemberService shopMemberService;
|
||||||
|
|
||||||
|
|
||||||
|
@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("listpagebyshopid/{shopId}")
|
||||||
|
public SuccessResultList<List<ShopMemberDTO>> listpagebyShopId(@PathVariable("shopId") String shopId, ListPage page) {
|
||||||
|
Map<String, Object> params = requestParams();
|
||||||
|
params.put("shopId",shopId);
|
||||||
|
page.setParams(params);
|
||||||
|
return shopMemberService.listPage(page);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "新增", notes = "新增接口")
|
@ApiOperation(value = "新增", notes = "新增接口")
|
||||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
@PostMapping("save")
|
@PostMapping("save")
|
||||||
|
@ -34,6 +34,28 @@ public class ShopPositionController extends DefaultBaseController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IShopPositionService shopPositionService;
|
private IShopPositionService shopPositionService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@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("listpagebyshopid/{shopId}")
|
||||||
|
public SuccessResultList<List<ShopPositionDTO>> listpageByShopId(@PathVariable("shopId") String shopId,ListPage page) {
|
||||||
|
Map<String, Object> params = requestParams();
|
||||||
|
params.put("shopId",shopId);
|
||||||
|
page.setParams(params);
|
||||||
|
return shopPositionService.listPage(page);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "新增", notes = "新增接口")
|
@ApiOperation(value = "新增", notes = "新增接口")
|
||||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
@PostMapping("save")
|
@PostMapping("save")
|
||||||
|
@ -4,9 +4,11 @@ import cn.com.tenlion.pojo.dtos.shop.ShopDTO;
|
|||||||
import cn.com.tenlion.pojo.vos.shop.ShopVO;
|
import cn.com.tenlion.pojo.vos.shop.ShopVO;
|
||||||
import cn.com.tenlion.service.shop.IShopService;
|
import cn.com.tenlion.service.shop.IShopService;
|
||||||
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
||||||
|
import ink.wgink.app.AppTokenManager;
|
||||||
import ink.wgink.common.base.DefaultBaseController;
|
import ink.wgink.common.base.DefaultBaseController;
|
||||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||||
import ink.wgink.pojo.ListPage;
|
import ink.wgink.pojo.ListPage;
|
||||||
|
import ink.wgink.pojo.app.AppTokenUser;
|
||||||
import ink.wgink.pojo.result.ErrorResult;
|
import ink.wgink.pojo.result.ErrorResult;
|
||||||
import ink.wgink.pojo.result.SuccessResult;
|
import ink.wgink.pojo.result.SuccessResult;
|
||||||
import ink.wgink.pojo.result.SuccessResultData;
|
import ink.wgink.pojo.result.SuccessResultData;
|
||||||
@ -46,9 +48,10 @@ public class ShopAppController extends DefaultBaseController {
|
|||||||
})
|
})
|
||||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
@GetMapping("myListPage")
|
@GetMapping("myListPage")
|
||||||
public SuccessResultList<List<ShopDTO>> myListPage(ListPage page) {
|
public SuccessResultList<List<ShopDTO>> myListPage(@RequestHeader("token") String token,ListPage page) {
|
||||||
Map<String, Object> params = requestParams();
|
Map<String, Object> params = requestParams();
|
||||||
params.put("creator","1");
|
AppTokenUser appTokenUser = AppTokenManager.getInstance().getToken(token).getAppTokenUser();
|
||||||
|
params.put("creator",appTokenUser.getId());
|
||||||
page.setParams(params);
|
page.setParams(params);
|
||||||
return shopService.listPage(page);
|
return shopService.listPage(page);
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,7 @@ package cn.com.tenlion.pojo.bos.shopmember;
|
|||||||
**/
|
**/
|
||||||
public class ShopMemberBO {
|
public class ShopMemberBO {
|
||||||
|
|
||||||
|
private String memberId;
|
||||||
private String shopId;
|
private String shopId;
|
||||||
private String userId;
|
private String userId;
|
||||||
private Integer memberLevel;
|
private Integer memberLevel;
|
||||||
@ -19,8 +20,16 @@ public class ShopMemberBO {
|
|||||||
private String modifier;
|
private String modifier;
|
||||||
private Integer isDelete;
|
private Integer isDelete;
|
||||||
|
|
||||||
|
public String getMemberId() {
|
||||||
|
return memberId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMemberId(String memberId) {
|
||||||
|
this.memberId = memberId;
|
||||||
|
}
|
||||||
|
|
||||||
public String getShopId() {
|
public String getShopId() {
|
||||||
return shopId == null ? "" : shopId.trim();
|
return shopId == null ? "" : shopId.trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setShopId(String shopId) {
|
public void setShopId(String shopId) {
|
||||||
|
@ -10,17 +10,27 @@ package cn.com.tenlion.pojo.bos.shopstaff;
|
|||||||
**/
|
**/
|
||||||
public class ShopStaffBO {
|
public class ShopStaffBO {
|
||||||
|
|
||||||
|
private String staffId;
|
||||||
private String shopId;
|
private String shopId;
|
||||||
private String userId;
|
private String userId;
|
||||||
private String positionId;
|
private String positionId;
|
||||||
private Integer isLeader;
|
private Integer isLeader;
|
||||||
private Integer isAdmin;
|
private Integer isAdmin;
|
||||||
|
private Integer auditStatus;
|
||||||
private String gmtCreate;
|
private String gmtCreate;
|
||||||
private String creator;
|
private String creator;
|
||||||
private String gmtModified;
|
private String gmtModified;
|
||||||
private String modifier;
|
private String modifier;
|
||||||
private Integer isDelete;
|
private Integer isDelete;
|
||||||
|
|
||||||
|
public String getStaffId() {
|
||||||
|
return staffId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStaffId(String staffId) {
|
||||||
|
this.staffId = staffId;
|
||||||
|
}
|
||||||
|
|
||||||
public String getShopId() {
|
public String getShopId() {
|
||||||
return shopId == null ? "" : shopId.trim();
|
return shopId == null ? "" : shopId.trim();
|
||||||
}
|
}
|
||||||
@ -61,6 +71,14 @@ public class ShopStaffBO {
|
|||||||
this.isAdmin = isAdmin;
|
this.isAdmin = isAdmin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Integer getAuditStatus() {
|
||||||
|
return auditStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAuditStatus(Integer auditStatus) {
|
||||||
|
this.auditStatus = auditStatus;
|
||||||
|
}
|
||||||
|
|
||||||
public String getGmtCreate() {
|
public String getGmtCreate() {
|
||||||
return gmtCreate == null ? "" : gmtCreate.trim();
|
return gmtCreate == null ? "" : gmtCreate.trim();
|
||||||
}
|
}
|
||||||
|
@ -26,11 +26,8 @@ public class ShopDTO {
|
|||||||
private Double shopStar;
|
private Double shopStar;
|
||||||
@ApiModelProperty(name = "shopLogo", value = "店铺LOGO文件ID")
|
@ApiModelProperty(name = "shopLogo", value = "店铺LOGO文件ID")
|
||||||
private String shopLogo;
|
private String shopLogo;
|
||||||
|
|
||||||
@ApiModelProperty(name = "shopTemplateId", value = "模板ID")
|
@ApiModelProperty(name = "shopTemplateId", value = "模板ID")
|
||||||
private Integer shopTemplateId;
|
private Integer shopTemplateId;
|
||||||
|
|
||||||
|
|
||||||
@ApiModelProperty(name = "userEvaluate", value = "用户评价,分数,满分10分,通过用户对商品的满意度计算")
|
@ApiModelProperty(name = "userEvaluate", value = "用户评价,分数,满分10分,通过用户对商品的满意度计算")
|
||||||
private Double userEvaluate;
|
private Double userEvaluate;
|
||||||
@ApiModelProperty(name = "isOpen", value = "是否营业 0:未开业,1:开业中")
|
@ApiModelProperty(name = "isOpen", value = "是否营业 0:未开业,1:开业中")
|
||||||
@ -45,6 +42,8 @@ public class ShopDTO {
|
|||||||
private String gmtCreate;
|
private String gmtCreate;
|
||||||
@ApiModelProperty(name = "creator", value = "创建人")
|
@ApiModelProperty(name = "creator", value = "创建人")
|
||||||
private String creator;
|
private String creator;
|
||||||
|
@ApiModelProperty(name = "creatorName", value = "创建人")
|
||||||
|
private String creatorName;
|
||||||
|
|
||||||
|
|
||||||
public String getShopId() {
|
public String getShopId() {
|
||||||
@ -160,4 +159,12 @@ public class ShopDTO {
|
|||||||
public void setIsCertification(Integer isCertification) {
|
public void setIsCertification(Integer isCertification) {
|
||||||
this.isCertification = isCertification;
|
this.isCertification = isCertification;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getCreatorName() {
|
||||||
|
return creatorName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreatorName(String creatorName) {
|
||||||
|
this.creatorName = creatorName;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,15 +14,32 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
@ApiModel
|
@ApiModel
|
||||||
public class ShopMemberDTO {
|
public class ShopMemberDTO {
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "memberId", value = "主键 ID")
|
||||||
|
private String memberId;
|
||||||
@ApiModelProperty(name = "shopId", value = "商铺ID")
|
@ApiModelProperty(name = "shopId", value = "商铺ID")
|
||||||
private String shopId;
|
private String shopId;
|
||||||
@ApiModelProperty(name = "userId", value = "用户ID")
|
@ApiModelProperty(name = "userId", value = "用户ID")
|
||||||
private String userId;
|
private String userId;
|
||||||
|
@ApiModelProperty(name = "userName", value = "用户姓名")
|
||||||
|
private String userName;
|
||||||
|
@ApiModelProperty(name = "userUserName", value = "用户名")
|
||||||
|
private String userUserName;
|
||||||
|
|
||||||
|
|
||||||
@ApiModelProperty(name = "memberLevel", value = "会员等级")
|
@ApiModelProperty(name = "memberLevel", value = "会员等级")
|
||||||
private Integer memberLevel;
|
private Integer memberLevel;
|
||||||
@ApiModelProperty(name = "gmtCreate", value = "创建时间")
|
@ApiModelProperty(name = "gmtCreate", value = "创建时间")
|
||||||
private String gmtCreate;
|
private String gmtCreate;
|
||||||
|
|
||||||
|
public String getMemberId() {
|
||||||
|
return memberId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMemberId(String memberId) {
|
||||||
|
this.memberId = memberId;
|
||||||
|
}
|
||||||
|
|
||||||
public String getShopId() {
|
public String getShopId() {
|
||||||
return shopId == null ? "" : shopId.trim();
|
return shopId == null ? "" : shopId.trim();
|
||||||
}
|
}
|
||||||
@ -31,6 +48,9 @@ public class ShopMemberDTO {
|
|||||||
this.shopId = shopId;
|
this.shopId = shopId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public String getUserId() {
|
public String getUserId() {
|
||||||
return userId == null ? "" : userId.trim();
|
return userId == null ? "" : userId.trim();
|
||||||
}
|
}
|
||||||
@ -39,6 +59,22 @@ public class ShopMemberDTO {
|
|||||||
this.userId = userId;
|
this.userId = userId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getUserName() {
|
||||||
|
return userName == null ? "" : userName.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserName(String userName) {
|
||||||
|
this.userName = userName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUserUserName() {
|
||||||
|
return userUserName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserUserName(String userUserName) {
|
||||||
|
this.userUserName = userUserName;
|
||||||
|
}
|
||||||
|
|
||||||
public Integer getMemberLevel() {
|
public Integer getMemberLevel() {
|
||||||
return memberLevel == null ? 0 : memberLevel;
|
return memberLevel == null ? 0 : memberLevel;
|
||||||
}
|
}
|
||||||
|
@ -28,6 +28,10 @@ public class ShopPositionDTO {
|
|||||||
private String gmtCreate;
|
private String gmtCreate;
|
||||||
@ApiModelProperty(name = "creator", value = "创建人")
|
@ApiModelProperty(name = "creator", value = "创建人")
|
||||||
private String creator;
|
private String creator;
|
||||||
|
@ApiModelProperty(name = "creatorName", value = "创建人姓名")
|
||||||
|
private String creatorName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public String getPositionId() {
|
public String getPositionId() {
|
||||||
return positionId == null ? "" : positionId.trim();
|
return positionId == null ? "" : positionId.trim();
|
||||||
@ -85,5 +89,11 @@ public class ShopPositionDTO {
|
|||||||
this.creator = creator;
|
this.creator = creator;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getCreatorName() {
|
||||||
|
return creatorName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreatorName(String creatorName) {
|
||||||
|
this.creatorName = creatorName;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,9 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
@ApiModel
|
@ApiModel
|
||||||
public class ShopStaffDTO {
|
public class ShopStaffDTO {
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "staffId", value = "主键 ID")
|
||||||
|
private String staffId;
|
||||||
|
|
||||||
@ApiModelProperty(name = "shopId", value = "店铺ID")
|
@ApiModelProperty(name = "shopId", value = "店铺ID")
|
||||||
private String shopId;
|
private String shopId;
|
||||||
@ApiModelProperty(name = "userId", value = "员工ID")
|
@ApiModelProperty(name = "userId", value = "员工ID")
|
||||||
@ -30,6 +33,11 @@ public class ShopStaffDTO {
|
|||||||
private Integer isLeader;
|
private Integer isLeader;
|
||||||
@ApiModelProperty(name = "isAdmin", value = "是否为管理员")
|
@ApiModelProperty(name = "isAdmin", value = "是否为管理员")
|
||||||
private Integer isAdmin;
|
private Integer isAdmin;
|
||||||
|
@ApiModelProperty(name = "auditStatus", value = "审核状态 0未审核 1审核通过 -1审核不通过")
|
||||||
|
private Integer auditStatus;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ApiModelProperty(name = "gmtCreate", value = "创建时间")
|
@ApiModelProperty(name = "gmtCreate", value = "创建时间")
|
||||||
private String gmtCreate;
|
private String gmtCreate;
|
||||||
@ApiModelProperty(name = "creator", value = "创建人")
|
@ApiModelProperty(name = "creator", value = "创建人")
|
||||||
@ -39,6 +47,14 @@ public class ShopStaffDTO {
|
|||||||
@ApiModelProperty(name = "modifier", value = "修改人")
|
@ApiModelProperty(name = "modifier", value = "修改人")
|
||||||
private String modifier;
|
private String modifier;
|
||||||
|
|
||||||
|
public String getStaffId() {
|
||||||
|
return staffId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStaffId(String staffId) {
|
||||||
|
this.staffId = staffId;
|
||||||
|
}
|
||||||
|
|
||||||
public String getShopId() {
|
public String getShopId() {
|
||||||
return shopId == null ? "" : shopId.trim();
|
return shopId == null ? "" : shopId.trim();
|
||||||
}
|
}
|
||||||
@ -79,6 +95,14 @@ public class ShopStaffDTO {
|
|||||||
this.isAdmin = isAdmin;
|
this.isAdmin = isAdmin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Integer getAuditStatus() {
|
||||||
|
return auditStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAuditStatus(Integer auditStatus) {
|
||||||
|
this.auditStatus = auditStatus;
|
||||||
|
}
|
||||||
|
|
||||||
public String getGmtCreate() {
|
public String getGmtCreate() {
|
||||||
return gmtCreate == null ? "" : gmtCreate.trim();
|
return gmtCreate == null ? "" : gmtCreate.trim();
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ package cn.com.tenlion.pojo.pos.shopmember;
|
|||||||
* @Version: 3.0
|
* @Version: 3.0
|
||||||
**/
|
**/
|
||||||
public class ShopMemberPO {
|
public class ShopMemberPO {
|
||||||
|
private String memberId;
|
||||||
private String shopId;
|
private String shopId;
|
||||||
private String userId;
|
private String userId;
|
||||||
private Integer memberLevel;
|
private Integer memberLevel;
|
||||||
@ -19,6 +19,14 @@ public class ShopMemberPO {
|
|||||||
private String modifier;
|
private String modifier;
|
||||||
private Integer isDelete;
|
private Integer isDelete;
|
||||||
|
|
||||||
|
public String getMemberId() {
|
||||||
|
return memberId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMemberId(String memberId) {
|
||||||
|
this.memberId = memberId;
|
||||||
|
}
|
||||||
|
|
||||||
public String getShopId() {
|
public String getShopId() {
|
||||||
return shopId == null ? "" : shopId.trim();
|
return shopId == null ? "" : shopId.trim();
|
||||||
}
|
}
|
||||||
|
@ -10,17 +10,28 @@ package cn.com.tenlion.pojo.pos.shopstaff;
|
|||||||
**/
|
**/
|
||||||
public class ShopStaffPO {
|
public class ShopStaffPO {
|
||||||
|
|
||||||
|
|
||||||
|
private String staffId;
|
||||||
private String shopId;
|
private String shopId;
|
||||||
private String userId;
|
private String userId;
|
||||||
private String positionId;
|
private String positionId;
|
||||||
private Integer isLeader;
|
private Integer isLeader;
|
||||||
private Integer isAdmin;
|
private Integer isAdmin;
|
||||||
|
private Integer auditStatus;
|
||||||
private String gmtCreate;
|
private String gmtCreate;
|
||||||
private String creator;
|
private String creator;
|
||||||
private String gmtModified;
|
private String gmtModified;
|
||||||
private String modifier;
|
private String modifier;
|
||||||
private Integer isDelete;
|
private Integer isDelete;
|
||||||
|
|
||||||
|
public String getStaffId() {
|
||||||
|
return staffId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStaffId(String staffId) {
|
||||||
|
this.staffId = staffId;
|
||||||
|
}
|
||||||
|
|
||||||
public String getShopId() {
|
public String getShopId() {
|
||||||
return shopId == null ? "" : shopId.trim();
|
return shopId == null ? "" : shopId.trim();
|
||||||
}
|
}
|
||||||
@ -61,6 +72,14 @@ public class ShopStaffPO {
|
|||||||
this.isAdmin = isAdmin;
|
this.isAdmin = isAdmin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Integer getAuditStatus() {
|
||||||
|
return auditStatus;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAuditStatus(Integer auditStatus) {
|
||||||
|
this.auditStatus = auditStatus;
|
||||||
|
}
|
||||||
|
|
||||||
public String getGmtCreate() {
|
public String getGmtCreate() {
|
||||||
return gmtCreate == null ? "" : gmtCreate.trim();
|
return gmtCreate == null ? "" : gmtCreate.trim();
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,9 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
@ApiModel
|
@ApiModel
|
||||||
public class ShopMemberVO {
|
public class ShopMemberVO {
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "memberId", value = "主键 ID")
|
||||||
|
private String memberId;
|
||||||
@ApiModelProperty(name = "shopId", value = "商铺ID")
|
@ApiModelProperty(name = "shopId", value = "商铺ID")
|
||||||
private String shopId;
|
private String shopId;
|
||||||
@ApiModelProperty(name = "userId", value = "用户ID")
|
@ApiModelProperty(name = "userId", value = "用户ID")
|
||||||
@ -27,6 +30,15 @@ public class ShopMemberVO {
|
|||||||
@CheckEmptyAnnotation(name = "创建时间", verifyType = "datetime")
|
@CheckEmptyAnnotation(name = "创建时间", verifyType = "datetime")
|
||||||
private String gmtCreate;
|
private String gmtCreate;
|
||||||
|
|
||||||
|
|
||||||
|
public String getMemberId() {
|
||||||
|
return memberId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMemberId(String memberId) {
|
||||||
|
this.memberId = memberId;
|
||||||
|
}
|
||||||
|
|
||||||
public String getShopId() {
|
public String getShopId() {
|
||||||
return shopId == null ? "" : shopId.trim();
|
return shopId == null ? "" : shopId.trim();
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,9 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
@ApiModel
|
@ApiModel
|
||||||
public class ShopStaffVO {
|
public class ShopStaffVO {
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "staffId", value = "主键 ID")
|
||||||
|
private String staffId;
|
||||||
|
|
||||||
@ApiModelProperty(name = "shopId", value = "店铺ID")
|
@ApiModelProperty(name = "shopId", value = "店铺ID")
|
||||||
private String shopId;
|
private String shopId;
|
||||||
@ApiModelProperty(name = "userId", value = "员工ID")
|
@ApiModelProperty(name = "userId", value = "员工ID")
|
||||||
@ -29,6 +32,15 @@ public class ShopStaffVO {
|
|||||||
@CheckNumberAnnotation(name = "是否为管理员")
|
@CheckNumberAnnotation(name = "是否为管理员")
|
||||||
private Integer isAdmin;
|
private Integer isAdmin;
|
||||||
|
|
||||||
|
|
||||||
|
public String getStaffId() {
|
||||||
|
return staffId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStaffId(String staffId) {
|
||||||
|
this.staffId = staffId;
|
||||||
|
}
|
||||||
|
|
||||||
public String getShopId() {
|
public String getShopId() {
|
||||||
return shopId == null ? "" : shopId.trim();
|
return shopId == null ? "" : shopId.trim();
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package cn.com.tenlion.service.shop.impl;
|
package cn.com.tenlion.service.shop.impl;
|
||||||
|
|
||||||
|
import cn.com.tenlion.accesstokenmanager.AccessTokenManager;
|
||||||
import cn.com.tenlion.dao.shop.IShopDao;
|
import cn.com.tenlion.dao.shop.IShopDao;
|
||||||
import cn.com.tenlion.pojo.bos.shop.ShopBO;
|
import cn.com.tenlion.pojo.bos.shop.ShopBO;
|
||||||
import cn.com.tenlion.pojo.dtos.shop.ShopDTO;
|
import cn.com.tenlion.pojo.dtos.shop.ShopDTO;
|
||||||
@ -14,11 +15,15 @@ import cn.com.tenlion.service.shopauditlog.IShopAuditLogService;
|
|||||||
import cn.com.tenlion.service.shopindusrty.IShopIndusrtyService;
|
import cn.com.tenlion.service.shopindusrty.IShopIndusrtyService;
|
||||||
import cn.com.tenlion.service.shopposition.IShopPositionService;
|
import cn.com.tenlion.service.shopposition.IShopPositionService;
|
||||||
import cn.com.tenlion.service.shopstaff.IShopStaffService;
|
import cn.com.tenlion.service.shopstaff.IShopStaffService;
|
||||||
|
import ink.wgink.app.AppTokenManager;
|
||||||
import ink.wgink.common.base.DefaultBaseService;
|
import ink.wgink.common.base.DefaultBaseService;
|
||||||
import ink.wgink.common.component.SecurityComponent;
|
import ink.wgink.common.component.SecurityComponent;
|
||||||
import ink.wgink.pojo.ListPage;
|
import ink.wgink.pojo.ListPage;
|
||||||
|
import ink.wgink.pojo.app.AppTokenUser;
|
||||||
|
import ink.wgink.pojo.dtos.user.UserDTO;
|
||||||
import ink.wgink.pojo.result.SuccessResult;
|
import ink.wgink.pojo.result.SuccessResult;
|
||||||
import ink.wgink.pojo.result.SuccessResultList;
|
import ink.wgink.pojo.result.SuccessResultList;
|
||||||
|
import ink.wgink.service.user.service.IUserService;
|
||||||
import ink.wgink.util.map.HashMapUtil;
|
import ink.wgink.util.map.HashMapUtil;
|
||||||
import ink.wgink.util.UUIDUtil;
|
import ink.wgink.util.UUIDUtil;
|
||||||
|
|
||||||
@ -50,11 +55,8 @@ public class ShopServiceImpl extends DefaultBaseService implements IShopService
|
|||||||
private IShopStaffService shopStaffService;
|
private IShopStaffService shopStaffService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IShopPositionService shopPositionServicel;
|
private IShopPositionService shopPositionServicel;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
protected SecurityComponent securityComponent;
|
private IUserService userService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -92,15 +94,16 @@ public class ShopServiceImpl extends DefaultBaseService implements IShopService
|
|||||||
shoppositionvo.setShopId(shopId);
|
shoppositionvo.setShopId(shopId);
|
||||||
shoppositionvo.setPositionName("店长");
|
shoppositionvo.setPositionName("店长");
|
||||||
shoppositionvo.setPositionOrder(1.0);
|
shoppositionvo.setPositionOrder(1.0);
|
||||||
String positonId = shopPositionServicel.saveReturnId(shoppositionvo);
|
String positonId = shopPositionServicel.saveReturnId(token,shoppositionvo);
|
||||||
LOG.info("新增员工表");
|
LOG.info("新增员工表");
|
||||||
ShopStaffVO shopstaffvo = new ShopStaffVO();
|
ShopStaffVO shopstaffvo = new ShopStaffVO();
|
||||||
shopstaffvo.setShopId(shopId);
|
shopstaffvo.setShopId(shopId);
|
||||||
shopstaffvo.setUserId(securityComponent.getCurrentUser().getUserId());
|
AppTokenUser appTokenUser = AppTokenManager.getInstance().getToken(token).getAppTokenUser();
|
||||||
|
shopstaffvo.setUserId(appTokenUser.getId());
|
||||||
shopstaffvo.setPositionId(positonId);
|
shopstaffvo.setPositionId(positonId);
|
||||||
shopstaffvo.setIsAdmin(0);
|
shopstaffvo.setIsAdmin(0);
|
||||||
shopstaffvo.setIsLeader(1);
|
shopstaffvo.setIsLeader(1);
|
||||||
shopStaffService.save(shopstaffvo);
|
shopStaffService.save(token,shopstaffvo);
|
||||||
return shopId;
|
return shopId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -183,7 +186,14 @@ public class ShopServiceImpl extends DefaultBaseService implements IShopService
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ShopDTO> list(Map<String, Object> params) {
|
public List<ShopDTO> list(Map<String, Object> params) {
|
||||||
return shopDao.list(params);
|
List<ShopDTO> list = shopDao.list(params);
|
||||||
|
for (ShopDTO shopDTO : list) {
|
||||||
|
UserDTO userDTO = userService.get(shopDTO.getCreator());
|
||||||
|
if(userDTO != null){
|
||||||
|
shopDTO.setCreatorName(userDTO.getUserName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -2,8 +2,10 @@ package cn.com.tenlion.service.shopmember.impl;
|
|||||||
|
|
||||||
import ink.wgink.common.base.DefaultBaseService;
|
import ink.wgink.common.base.DefaultBaseService;
|
||||||
import ink.wgink.pojo.ListPage;
|
import ink.wgink.pojo.ListPage;
|
||||||
|
import ink.wgink.pojo.dtos.user.UserDTO;
|
||||||
import ink.wgink.pojo.result.SuccessResult;
|
import ink.wgink.pojo.result.SuccessResult;
|
||||||
import ink.wgink.pojo.result.SuccessResultList;
|
import ink.wgink.pojo.result.SuccessResultList;
|
||||||
|
import ink.wgink.service.user.service.IUserService;
|
||||||
import ink.wgink.util.map.HashMapUtil;
|
import ink.wgink.util.map.HashMapUtil;
|
||||||
import ink.wgink.util.UUIDUtil;
|
import ink.wgink.util.UUIDUtil;
|
||||||
import cn.com.tenlion.dao.shopmember.IShopMemberDao;
|
import cn.com.tenlion.dao.shopmember.IShopMemberDao;
|
||||||
@ -32,6 +34,8 @@ public class ShopMemberServiceImpl extends DefaultBaseService implements IShopMe
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IShopMemberDao shopMemberDao;
|
private IShopMemberDao shopMemberDao;
|
||||||
|
@Autowired
|
||||||
|
private IUserService userService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void save(ShopMemberVO shopMemberVO) {
|
public void save(ShopMemberVO shopMemberVO) {
|
||||||
@ -52,7 +56,7 @@ public class ShopMemberServiceImpl extends DefaultBaseService implements IShopMe
|
|||||||
public String saveReturnId(String token, ShopMemberVO shopMemberVO) {
|
public String saveReturnId(String token, ShopMemberVO shopMemberVO) {
|
||||||
String shopMemberId = UUIDUtil.getUUID();
|
String shopMemberId = UUIDUtil.getUUID();
|
||||||
Map<String, Object> params = HashMapUtil.beanToMap(shopMemberVO);
|
Map<String, Object> params = HashMapUtil.beanToMap(shopMemberVO);
|
||||||
params.put("shopMemberId", shopMemberId);
|
params.put("memberId", shopMemberId);
|
||||||
if (StringUtils.isBlank(token)) {
|
if (StringUtils.isBlank(token)) {
|
||||||
setSaveInfo(params);
|
setSaveInfo(params);
|
||||||
} else {
|
} else {
|
||||||
@ -70,7 +74,7 @@ public class ShopMemberServiceImpl extends DefaultBaseService implements IShopMe
|
|||||||
@Override
|
@Override
|
||||||
public void remove(String token, List<String> ids) {
|
public void remove(String token, List<String> ids) {
|
||||||
Map<String, Object> params = getHashMap(2);
|
Map<String, Object> params = getHashMap(2);
|
||||||
params.put("shopMemberIds", ids);
|
params.put("memberIds", ids);
|
||||||
if (StringUtils.isBlank(token)) {
|
if (StringUtils.isBlank(token)) {
|
||||||
setUpdateInfo(params);
|
setUpdateInfo(params);
|
||||||
} else {
|
} else {
|
||||||
@ -82,7 +86,7 @@ public class ShopMemberServiceImpl extends DefaultBaseService implements IShopMe
|
|||||||
@Override
|
@Override
|
||||||
public void delete(List<String> ids) {
|
public void delete(List<String> ids) {
|
||||||
Map<String, Object> params = getHashMap(2);
|
Map<String, Object> params = getHashMap(2);
|
||||||
params.put("shopMemberIds", ids);
|
params.put("memberIds", ids);
|
||||||
shopMemberDao.delete(params);
|
shopMemberDao.delete(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -94,7 +98,7 @@ public class ShopMemberServiceImpl extends DefaultBaseService implements IShopMe
|
|||||||
@Override
|
@Override
|
||||||
public void update(String token, String shopMemberId, ShopMemberVO shopMemberVO) {
|
public void update(String token, String shopMemberId, ShopMemberVO shopMemberVO) {
|
||||||
Map<String, Object> params = HashMapUtil.beanToMap(shopMemberVO);
|
Map<String, Object> params = HashMapUtil.beanToMap(shopMemberVO);
|
||||||
params.put("shopMemberId", shopMemberId);
|
params.put("memberId", shopMemberId);
|
||||||
if (StringUtils.isBlank(token)) {
|
if (StringUtils.isBlank(token)) {
|
||||||
setUpdateInfo(params);
|
setUpdateInfo(params);
|
||||||
} else {
|
} else {
|
||||||
@ -111,8 +115,15 @@ public class ShopMemberServiceImpl extends DefaultBaseService implements IShopMe
|
|||||||
@Override
|
@Override
|
||||||
public ShopMemberDTO get(String shopMemberId) {
|
public ShopMemberDTO get(String shopMemberId) {
|
||||||
Map<String, Object> params = super.getHashMap(2);
|
Map<String, Object> params = super.getHashMap(2);
|
||||||
params.put("shopMemberId", shopMemberId);
|
params.put("memberId", shopMemberId);
|
||||||
return get(params);
|
ShopMemberDTO shopMemberDTO = get(params);
|
||||||
|
if(shopMemberDTO != null){
|
||||||
|
UserDTO userDTO = userService.get(shopMemberDTO.getUserId());
|
||||||
|
if(userDTO != null){
|
||||||
|
shopMemberDTO.setUserName(userDTO.getUserName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return shopMemberDTO;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -123,7 +134,7 @@ public class ShopMemberServiceImpl extends DefaultBaseService implements IShopMe
|
|||||||
@Override
|
@Override
|
||||||
public ShopMemberBO getBO(String shopMemberId) {
|
public ShopMemberBO getBO(String shopMemberId) {
|
||||||
Map<String, Object> params = super.getHashMap(2);
|
Map<String, Object> params = super.getHashMap(2);
|
||||||
params.put("shopMemberId", shopMemberId);
|
params.put("memberId", shopMemberId);
|
||||||
return getBO(params);
|
return getBO(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -135,13 +146,23 @@ public class ShopMemberServiceImpl extends DefaultBaseService implements IShopMe
|
|||||||
@Override
|
@Override
|
||||||
public ShopMemberPO getPO(String shopMemberId) {
|
public ShopMemberPO getPO(String shopMemberId) {
|
||||||
Map<String, Object> params = super.getHashMap(2);
|
Map<String, Object> params = super.getHashMap(2);
|
||||||
params.put("shopMemberId", shopMemberId);
|
params.put("memberId", shopMemberId);
|
||||||
return getPO(params);
|
return getPO(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ShopMemberDTO> list(Map<String, Object> params) {
|
public List<ShopMemberDTO> list(Map<String, Object> params) {
|
||||||
return shopMemberDao.list(params);
|
List<ShopMemberDTO> list = shopMemberDao.list(params);
|
||||||
|
for (ShopMemberDTO shopMemberDTO : list) {
|
||||||
|
if(shopMemberDTO != null){
|
||||||
|
UserDTO userDTO = userService.get(shopMemberDTO.getUserId());
|
||||||
|
if(userDTO != null){
|
||||||
|
shopMemberDTO.setUserName(userDTO.getUserName());
|
||||||
|
shopMemberDTO.setUserUserName(userDTO.getUserUsername());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -2,8 +2,10 @@ package cn.com.tenlion.service.shopposition.impl;
|
|||||||
|
|
||||||
import ink.wgink.common.base.DefaultBaseService;
|
import ink.wgink.common.base.DefaultBaseService;
|
||||||
import ink.wgink.pojo.ListPage;
|
import ink.wgink.pojo.ListPage;
|
||||||
|
import ink.wgink.pojo.dtos.user.UserDTO;
|
||||||
import ink.wgink.pojo.result.SuccessResult;
|
import ink.wgink.pojo.result.SuccessResult;
|
||||||
import ink.wgink.pojo.result.SuccessResultList;
|
import ink.wgink.pojo.result.SuccessResultList;
|
||||||
|
import ink.wgink.service.user.service.IUserService;
|
||||||
import ink.wgink.util.map.HashMapUtil;
|
import ink.wgink.util.map.HashMapUtil;
|
||||||
import ink.wgink.util.UUIDUtil;
|
import ink.wgink.util.UUIDUtil;
|
||||||
import cn.com.tenlion.dao.shopposition.IShopPositionDao;
|
import cn.com.tenlion.dao.shopposition.IShopPositionDao;
|
||||||
@ -32,6 +34,8 @@ public class ShopPositionServiceImpl extends DefaultBaseService implements IShop
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IShopPositionDao shopPositionDao;
|
private IShopPositionDao shopPositionDao;
|
||||||
|
@Autowired
|
||||||
|
private IUserService userServicel;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void save(ShopPositionVO shopPositionVO) {
|
public void save(ShopPositionVO shopPositionVO) {
|
||||||
@ -94,7 +98,7 @@ public class ShopPositionServiceImpl extends DefaultBaseService implements IShop
|
|||||||
@Override
|
@Override
|
||||||
public void update(String token, String shopPositionId, ShopPositionVO shopPositionVO) {
|
public void update(String token, String shopPositionId, ShopPositionVO shopPositionVO) {
|
||||||
Map<String, Object> params = HashMapUtil.beanToMap(shopPositionVO);
|
Map<String, Object> params = HashMapUtil.beanToMap(shopPositionVO);
|
||||||
params.put("shopPositionId", shopPositionId);
|
params.put("positionId", shopPositionId);
|
||||||
if (StringUtils.isBlank(token)) {
|
if (StringUtils.isBlank(token)) {
|
||||||
setUpdateInfo(params);
|
setUpdateInfo(params);
|
||||||
} else {
|
} else {
|
||||||
@ -111,8 +115,13 @@ public class ShopPositionServiceImpl extends DefaultBaseService implements IShop
|
|||||||
@Override
|
@Override
|
||||||
public ShopPositionDTO get(String shopPositionId) {
|
public ShopPositionDTO get(String shopPositionId) {
|
||||||
Map<String, Object> params = super.getHashMap(2);
|
Map<String, Object> params = super.getHashMap(2);
|
||||||
params.put("shopPositionId", shopPositionId);
|
params.put("positionId", shopPositionId);
|
||||||
return get(params);
|
ShopPositionDTO shopPositionDTO = get(params);
|
||||||
|
UserDTO userDTO = userServicel.get(shopPositionDTO.getCreator());
|
||||||
|
if(userDTO != null){
|
||||||
|
shopPositionDTO.setCreatorName(userDTO.getUserName());
|
||||||
|
}
|
||||||
|
return shopPositionDTO;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -123,7 +132,7 @@ public class ShopPositionServiceImpl extends DefaultBaseService implements IShop
|
|||||||
@Override
|
@Override
|
||||||
public ShopPositionBO getBO(String shopPositionId) {
|
public ShopPositionBO getBO(String shopPositionId) {
|
||||||
Map<String, Object> params = super.getHashMap(2);
|
Map<String, Object> params = super.getHashMap(2);
|
||||||
params.put("shopPositionId", shopPositionId);
|
params.put("positionId", shopPositionId);
|
||||||
return getBO(params);
|
return getBO(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -135,13 +144,20 @@ public class ShopPositionServiceImpl extends DefaultBaseService implements IShop
|
|||||||
@Override
|
@Override
|
||||||
public ShopPositionPO getPO(String shopPositionId) {
|
public ShopPositionPO getPO(String shopPositionId) {
|
||||||
Map<String, Object> params = super.getHashMap(2);
|
Map<String, Object> params = super.getHashMap(2);
|
||||||
params.put("shopPositionId", shopPositionId);
|
params.put("positionId", shopPositionId);
|
||||||
return getPO(params);
|
return getPO(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ShopPositionDTO> list(Map<String, Object> params) {
|
public List<ShopPositionDTO> list(Map<String, Object> params) {
|
||||||
return shopPositionDao.list(params);
|
List<ShopPositionDTO> list = shopPositionDao.list(params);
|
||||||
|
for (ShopPositionDTO shopPositionDTO : list) {
|
||||||
|
UserDTO userDTO = userServicel.get(shopPositionDTO.getCreator());
|
||||||
|
if(userDTO != null){
|
||||||
|
shopPositionDTO.setCreatorName(userDTO.getUserName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1,9 +1,13 @@
|
|||||||
package cn.com.tenlion.service.shopstaff.impl;
|
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.common.base.DefaultBaseService;
|
||||||
import ink.wgink.pojo.ListPage;
|
import ink.wgink.pojo.ListPage;
|
||||||
|
import ink.wgink.pojo.dtos.user.UserDTO;
|
||||||
import ink.wgink.pojo.result.SuccessResult;
|
import ink.wgink.pojo.result.SuccessResult;
|
||||||
import ink.wgink.pojo.result.SuccessResultList;
|
import ink.wgink.pojo.result.SuccessResultList;
|
||||||
|
import ink.wgink.service.user.service.IUserService;
|
||||||
import ink.wgink.util.map.HashMapUtil;
|
import ink.wgink.util.map.HashMapUtil;
|
||||||
import ink.wgink.util.UUIDUtil;
|
import ink.wgink.util.UUIDUtil;
|
||||||
import cn.com.tenlion.dao.shopstaff.IShopStaffDao;
|
import cn.com.tenlion.dao.shopstaff.IShopStaffDao;
|
||||||
@ -32,6 +36,11 @@ public class ShopStaffServiceImpl extends DefaultBaseService implements IShopSta
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IShopStaffDao shopStaffDao;
|
private IShopStaffDao shopStaffDao;
|
||||||
|
@Autowired
|
||||||
|
private IUserService userService;
|
||||||
|
@Autowired
|
||||||
|
private IShopPositionService shopPositionService;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void save(ShopStaffVO shopStaffVO) {
|
public void save(ShopStaffVO shopStaffVO) {
|
||||||
@ -53,6 +62,7 @@ public class ShopStaffServiceImpl extends DefaultBaseService implements IShopSta
|
|||||||
String shopStaffId = UUIDUtil.getUUID();
|
String shopStaffId = UUIDUtil.getUUID();
|
||||||
Map<String, Object> params = HashMapUtil.beanToMap(shopStaffVO);
|
Map<String, Object> params = HashMapUtil.beanToMap(shopStaffVO);
|
||||||
params.put("shopStaffId", shopStaffId);
|
params.put("shopStaffId", shopStaffId);
|
||||||
|
params.put("auditResult", "1");
|
||||||
if (StringUtils.isBlank(token)) {
|
if (StringUtils.isBlank(token)) {
|
||||||
setSaveInfo(params);
|
setSaveInfo(params);
|
||||||
} else {
|
} else {
|
||||||
@ -70,7 +80,7 @@ public class ShopStaffServiceImpl extends DefaultBaseService implements IShopSta
|
|||||||
@Override
|
@Override
|
||||||
public void remove(String token, List<String> ids) {
|
public void remove(String token, List<String> ids) {
|
||||||
Map<String, Object> params = getHashMap(2);
|
Map<String, Object> params = getHashMap(2);
|
||||||
params.put("shopStaffIds", ids);
|
params.put("staffIds", ids);
|
||||||
if (StringUtils.isBlank(token)) {
|
if (StringUtils.isBlank(token)) {
|
||||||
setUpdateInfo(params);
|
setUpdateInfo(params);
|
||||||
} else {
|
} else {
|
||||||
@ -82,7 +92,7 @@ public class ShopStaffServiceImpl extends DefaultBaseService implements IShopSta
|
|||||||
@Override
|
@Override
|
||||||
public void delete(List<String> ids) {
|
public void delete(List<String> ids) {
|
||||||
Map<String, Object> params = getHashMap(2);
|
Map<String, Object> params = getHashMap(2);
|
||||||
params.put("shopStaffIds", ids);
|
params.put("staffIds", ids);
|
||||||
shopStaffDao.delete(params);
|
shopStaffDao.delete(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -94,7 +104,7 @@ public class ShopStaffServiceImpl extends DefaultBaseService implements IShopSta
|
|||||||
@Override
|
@Override
|
||||||
public void update(String token, String shopStaffId, ShopStaffVO shopStaffVO) {
|
public void update(String token, String shopStaffId, ShopStaffVO shopStaffVO) {
|
||||||
Map<String, Object> params = HashMapUtil.beanToMap(shopStaffVO);
|
Map<String, Object> params = HashMapUtil.beanToMap(shopStaffVO);
|
||||||
params.put("shopStaffId", shopStaffId);
|
params.put("staffId", shopStaffId);
|
||||||
if (StringUtils.isBlank(token)) {
|
if (StringUtils.isBlank(token)) {
|
||||||
setUpdateInfo(params);
|
setUpdateInfo(params);
|
||||||
} else {
|
} else {
|
||||||
@ -111,8 +121,19 @@ public class ShopStaffServiceImpl extends DefaultBaseService implements IShopSta
|
|||||||
@Override
|
@Override
|
||||||
public ShopStaffDTO get(String shopStaffId) {
|
public ShopStaffDTO get(String shopStaffId) {
|
||||||
Map<String, Object> params = super.getHashMap(2);
|
Map<String, Object> params = super.getHashMap(2);
|
||||||
params.put("shopStaffId", shopStaffId);
|
params.put("staffId", shopStaffId);
|
||||||
return get(params);
|
ShopStaffDTO shopStaffDTO = get(params);
|
||||||
|
if(shopStaffDTO != null){
|
||||||
|
UserDTO userDTO = userService.get(shopStaffDTO.getUserId());
|
||||||
|
if(userDTO != null){
|
||||||
|
shopStaffDTO.setUserName(userDTO.getUserName());
|
||||||
|
}
|
||||||
|
ShopPositionDTO shopPositionDTO = shopPositionService.get(shopStaffDTO.getPositionId());
|
||||||
|
if(shopPositionDTO != null){
|
||||||
|
shopStaffDTO.setPositionName(shopPositionDTO.getPositionName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return shopStaffDTO;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -123,7 +144,7 @@ public class ShopStaffServiceImpl extends DefaultBaseService implements IShopSta
|
|||||||
@Override
|
@Override
|
||||||
public ShopStaffBO getBO(String shopStaffId) {
|
public ShopStaffBO getBO(String shopStaffId) {
|
||||||
Map<String, Object> params = super.getHashMap(2);
|
Map<String, Object> params = super.getHashMap(2);
|
||||||
params.put("shopStaffId", shopStaffId);
|
params.put("staffId", shopStaffId);
|
||||||
return getBO(params);
|
return getBO(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -135,13 +156,26 @@ public class ShopStaffServiceImpl extends DefaultBaseService implements IShopSta
|
|||||||
@Override
|
@Override
|
||||||
public ShopStaffPO getPO(String shopStaffId) {
|
public ShopStaffPO getPO(String shopStaffId) {
|
||||||
Map<String, Object> params = super.getHashMap(2);
|
Map<String, Object> params = super.getHashMap(2);
|
||||||
params.put("shopStaffId", shopStaffId);
|
params.put("staffId", shopStaffId);
|
||||||
return getPO(params);
|
return getPO(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ShopStaffDTO> list(Map<String, Object> params) {
|
public List<ShopStaffDTO> list(Map<String, Object> params) {
|
||||||
return shopStaffDao.list(params);
|
List<ShopStaffDTO> list = shopStaffDao.list(params);
|
||||||
|
for (ShopStaffDTO shopStaffDTO : list) {
|
||||||
|
if(shopStaffDTO != null){
|
||||||
|
UserDTO userDTO = userService.get(shopStaffDTO.getUserId());
|
||||||
|
if(userDTO != null){
|
||||||
|
shopStaffDTO.setUserName(userDTO.getUserName());
|
||||||
|
}
|
||||||
|
ShopPositionDTO shopPositionDTO = shopPositionService.get(shopStaffDTO.getPositionId());
|
||||||
|
if(shopPositionDTO != null){
|
||||||
|
shopStaffDTO.setPositionName(shopPositionDTO.getPositionName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -141,7 +141,7 @@
|
|||||||
shop_summary = #{shopSummary},
|
shop_summary = #{shopSummary},
|
||||||
</if>
|
</if>
|
||||||
<if test="shopAddress != null and shopAddress != ''">
|
<if test="shopAddress != null and shopAddress != ''">
|
||||||
shop_address = #{shopAddress},
|
shop_address = #{shopAddress},
|
||||||
</if>
|
</if>
|
||||||
<if test="shopStar != null">
|
<if test="shopStar != null">
|
||||||
shop_star = #{shopStar},
|
shop_star = #{shopStar},
|
||||||
@ -164,12 +164,6 @@
|
|||||||
<if test="isLogOff != null">
|
<if test="isLogOff != null">
|
||||||
is_log_off = #{isLogOff},
|
is_log_off = #{isLogOff},
|
||||||
</if>
|
</if>
|
||||||
<if test="gmtCreate != null and gmtCreate != ''">
|
|
||||||
gmt_create = #{gmtCreate},
|
|
||||||
</if>
|
|
||||||
<if test="creator != null and creator != ''">
|
|
||||||
creator = #{creator},
|
|
||||||
</if>
|
|
||||||
<if test="gmtModified != null and gmtModified != ''">
|
<if test="gmtModified != null and gmtModified != ''">
|
||||||
gmt_modified = #{gmtModified},
|
gmt_modified = #{gmtModified},
|
||||||
</if>
|
</if>
|
||||||
@ -305,7 +299,7 @@
|
|||||||
AND
|
AND
|
||||||
t1.creator = #{creator}
|
t1.creator = #{creator}
|
||||||
</if>
|
</if>
|
||||||
|
ORDER BY t1.gmt_create DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 列表-->
|
<!-- 列表-->
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
<mapper namespace="cn.com.tenlion.dao.shopmember.IShopMemberDao">
|
<mapper namespace="cn.com.tenlion.dao.shopmember.IShopMemberDao">
|
||||||
|
|
||||||
<resultMap id="shopMemberDTO" type="cn.com.tenlion.pojo.dtos.shopmember.ShopMemberDTO">
|
<resultMap id="shopMemberDTO" type="cn.com.tenlion.pojo.dtos.shopmember.ShopMemberDTO">
|
||||||
|
<result column="member_id" property="memberId"/>
|
||||||
<result column="shop_id" property="shopId"/>
|
<result column="shop_id" property="shopId"/>
|
||||||
<result column="user_id" property="userId"/>
|
<result column="user_id" property="userId"/>
|
||||||
<result column="member_level" property="memberLevel"/>
|
<result column="member_level" property="memberLevel"/>
|
||||||
@ -10,6 +11,7 @@
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<resultMap id="shopMemberBO" type="cn.com.tenlion.pojo.bos.shopmember.ShopMemberBO">
|
<resultMap id="shopMemberBO" type="cn.com.tenlion.pojo.bos.shopmember.ShopMemberBO">
|
||||||
|
<result column="member_id" property="memberId"/>
|
||||||
<result column="shop_id" property="shopId"/>
|
<result column="shop_id" property="shopId"/>
|
||||||
<result column="user_id" property="userId"/>
|
<result column="user_id" property="userId"/>
|
||||||
<result column="member_level" property="memberLevel"/>
|
<result column="member_level" property="memberLevel"/>
|
||||||
@ -21,6 +23,7 @@
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<resultMap id="shopMemberPO" type="cn.com.tenlion.pojo.pos.shopmember.ShopMemberPO">
|
<resultMap id="shopMemberPO" type="cn.com.tenlion.pojo.pos.shopmember.ShopMemberPO">
|
||||||
|
<result column="member_id" property="memberId"/>
|
||||||
<result column="shop_id" property="shopId"/>
|
<result column="shop_id" property="shopId"/>
|
||||||
<result column="user_id" property="userId"/>
|
<result column="user_id" property="userId"/>
|
||||||
<result column="member_level" property="memberLevel"/>
|
<result column="member_level" property="memberLevel"/>
|
||||||
@ -33,6 +36,7 @@
|
|||||||
|
|
||||||
<insert id="save" parameterType="map">
|
<insert id="save" parameterType="map">
|
||||||
INSERT INTO svc_shop_member(
|
INSERT INTO svc_shop_member(
|
||||||
|
member_id,
|
||||||
shop_id,
|
shop_id,
|
||||||
user_id,
|
user_id,
|
||||||
member_level,
|
member_level,
|
||||||
@ -42,6 +46,7 @@
|
|||||||
modifier,
|
modifier,
|
||||||
is_delete
|
is_delete
|
||||||
) VALUES(
|
) VALUES(
|
||||||
|
#{memberId},
|
||||||
#{shopId},
|
#{shopId},
|
||||||
#{userId},
|
#{userId},
|
||||||
#{memberLevel},
|
#{memberLevel},
|
||||||
@ -61,12 +66,21 @@
|
|||||||
modifier = #{modifier},
|
modifier = #{modifier},
|
||||||
is_delete = 1
|
is_delete = 1
|
||||||
WHERE
|
WHERE
|
||||||
|
member_id IN
|
||||||
|
<foreach collection="memberIds" index="index" open="(" separator="," close=")">
|
||||||
|
#{memberIds[${index}]}
|
||||||
|
</foreach>
|
||||||
|
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<update id="delete" parameterType="map">
|
<update id="delete" parameterType="map">
|
||||||
DELETE FROM
|
DELETE FROM
|
||||||
svc_shop_member
|
svc_shop_member
|
||||||
WHERE
|
WHERE
|
||||||
|
member_id IN
|
||||||
|
<foreach collection="memberIds" index="index" open="(" separator="," close=")">
|
||||||
|
#{memberIds[${index}]}
|
||||||
|
</foreach>
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<update id="update" parameterType="map">
|
<update id="update" parameterType="map">
|
||||||
@ -98,23 +112,27 @@
|
|||||||
is_delete = #{isDelete}
|
is_delete = #{isDelete}
|
||||||
</if>
|
</if>
|
||||||
WHERE
|
WHERE
|
||||||
|
member_id = #{memberId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<select id="get" parameterType="map" resultMap="shopMemberDTO">
|
<select id="get" parameterType="map" resultMap="shopMemberDTO">
|
||||||
SELECT
|
SELECT
|
||||||
|
t1.member_id,
|
||||||
t1.shop_id,
|
t1.shop_id,
|
||||||
t1.user_id,
|
t1.user_id,
|
||||||
t1.member_level,
|
t1.member_level,
|
||||||
t1.gmt_create,
|
t1.gmt_create
|
||||||
1
|
|
||||||
FROM
|
FROM
|
||||||
svc_shop_member t1
|
svc_shop_member t1
|
||||||
WHERE
|
WHERE
|
||||||
t1.is_delete = 0
|
t1.is_delete = 0
|
||||||
|
AND
|
||||||
|
t1.member_id = #{memberId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getBO" parameterType="map" resultMap="shopMemberBO">
|
<select id="getBO" parameterType="map" resultMap="shopMemberBO">
|
||||||
SELECT
|
SELECT
|
||||||
|
t1.member_id,
|
||||||
t1.shop_id,
|
t1.shop_id,
|
||||||
t1.user_id,
|
t1.user_id,
|
||||||
t1.member_level,
|
t1.member_level,
|
||||||
@ -127,10 +145,13 @@
|
|||||||
svc_shop_member t1
|
svc_shop_member t1
|
||||||
WHERE
|
WHERE
|
||||||
t1.is_delete = 0
|
t1.is_delete = 0
|
||||||
|
AND
|
||||||
|
t1.member_id = #{memberId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getPO" parameterType="map" resultMap="shopMemberPO">
|
<select id="getPO" parameterType="map" resultMap="shopMemberPO">
|
||||||
SELECT
|
SELECT
|
||||||
|
t1.member_id,
|
||||||
t1.shop_id,
|
t1.shop_id,
|
||||||
t1.user_id,
|
t1.user_id,
|
||||||
t1.member_level,
|
t1.member_level,
|
||||||
@ -143,15 +164,17 @@
|
|||||||
svc_shop_member t1
|
svc_shop_member t1
|
||||||
WHERE
|
WHERE
|
||||||
t1.is_delete = 0
|
t1.is_delete = 0
|
||||||
|
AND
|
||||||
|
t1.member_id = #{memberId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="list" parameterType="map" resultMap="shopMemberDTO">
|
<select id="list" parameterType="map" resultMap="shopMemberDTO">
|
||||||
SELECT
|
SELECT
|
||||||
|
t1.member_id,
|
||||||
t1.shop_id,
|
t1.shop_id,
|
||||||
t1.user_id,
|
t1.user_id,
|
||||||
t1.member_level,
|
t1.member_level,
|
||||||
t1.gmt_create,
|
t1.gmt_create
|
||||||
1
|
|
||||||
FROM
|
FROM
|
||||||
svc_shop_member t1
|
svc_shop_member t1
|
||||||
WHERE
|
WHERE
|
||||||
@ -177,6 +200,7 @@
|
|||||||
|
|
||||||
<select id="listBO" parameterType="map" resultMap="shopMemberBO">
|
<select id="listBO" parameterType="map" resultMap="shopMemberBO">
|
||||||
SELECT
|
SELECT
|
||||||
|
t1.member_id,
|
||||||
t1.shop_id,
|
t1.shop_id,
|
||||||
t1.user_id,
|
t1.user_id,
|
||||||
t1.member_level,
|
t1.member_level,
|
||||||
@ -206,6 +230,7 @@
|
|||||||
|
|
||||||
<select id="listPO" parameterType="map" resultMap="shopMemberPO">
|
<select id="listPO" parameterType="map" resultMap="shopMemberPO">
|
||||||
SELECT
|
SELECT
|
||||||
|
t1.member_id,
|
||||||
t1.shop_id,
|
t1.shop_id,
|
||||||
t1.user_id,
|
t1.user_id,
|
||||||
t1.member_level,
|
t1.member_level,
|
||||||
|
@ -72,12 +72,20 @@
|
|||||||
modifier = #{modifier},
|
modifier = #{modifier},
|
||||||
is_delete = 1
|
is_delete = 1
|
||||||
WHERE
|
WHERE
|
||||||
|
position_id IN
|
||||||
|
<foreach collection="shopPositionIds" index="index" open="(" separator="," close=")">
|
||||||
|
#{shopPositionIds[${index}]}
|
||||||
|
</foreach>
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<update id="delete" parameterType="map">
|
<update id="delete" parameterType="map">
|
||||||
DELETE FROM
|
DELETE FROM
|
||||||
svc_shop_position
|
svc_shop_position
|
||||||
WHERE
|
WHERE
|
||||||
|
position_id IN
|
||||||
|
<foreach collection="shopPositionIds" index="index" open="(" separator="," close=")">
|
||||||
|
#{shopPositionIds[${index}]}
|
||||||
|
</foreach>
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<update id="update" parameterType="map">
|
<update id="update" parameterType="map">
|
||||||
@ -115,6 +123,7 @@
|
|||||||
is_delete = #{isDelete}
|
is_delete = #{isDelete}
|
||||||
</if>
|
</if>
|
||||||
WHERE
|
WHERE
|
||||||
|
position_id = #{positionId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<select id="get" parameterType="map" resultMap="shopPositionDTO">
|
<select id="get" parameterType="map" resultMap="shopPositionDTO">
|
||||||
@ -124,11 +133,14 @@
|
|||||||
t1.position_name,
|
t1.position_name,
|
||||||
t1.position_summary,
|
t1.position_summary,
|
||||||
t1.position_order,
|
t1.position_order,
|
||||||
1
|
t1.creator,
|
||||||
|
t1.gmt_modified
|
||||||
FROM
|
FROM
|
||||||
svc_shop_position t1
|
svc_shop_position t1
|
||||||
WHERE
|
WHERE
|
||||||
t1.is_delete = 0
|
t1.is_delete = 0
|
||||||
|
AND
|
||||||
|
t1.position_id = #{positionId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getBO" parameterType="map" resultMap="shopPositionBO">
|
<select id="getBO" parameterType="map" resultMap="shopPositionBO">
|
||||||
@ -147,6 +159,8 @@
|
|||||||
svc_shop_position t1
|
svc_shop_position t1
|
||||||
WHERE
|
WHERE
|
||||||
t1.is_delete = 0
|
t1.is_delete = 0
|
||||||
|
AND
|
||||||
|
t1.position_id = #{positionId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getPO" parameterType="map" resultMap="shopPositionPO">
|
<select id="getPO" parameterType="map" resultMap="shopPositionPO">
|
||||||
@ -165,6 +179,8 @@
|
|||||||
svc_shop_position t1
|
svc_shop_position t1
|
||||||
WHERE
|
WHERE
|
||||||
t1.is_delete = 0
|
t1.is_delete = 0
|
||||||
|
AND
|
||||||
|
t1.position_id = #{positionId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="list" parameterType="map" resultMap="shopPositionDTO">
|
<select id="list" parameterType="map" resultMap="shopPositionDTO">
|
||||||
@ -183,7 +199,7 @@
|
|||||||
t1.is_delete = 0
|
t1.is_delete = 0
|
||||||
<if test="keywords != null and keywords != ''">
|
<if test="keywords != null and keywords != ''">
|
||||||
AND (
|
AND (
|
||||||
t1.id LIKE CONCAT('%', #{keywords}, '%')
|
t1.position_name LIKE CONCAT('%', #{keywords}, '%')
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
<if test="startTime != null and startTime != ''">
|
<if test="startTime != null and startTime != ''">
|
||||||
@ -198,6 +214,7 @@
|
|||||||
AND
|
AND
|
||||||
t1.shop_id = #{shopId}
|
t1.shop_id = #{shopId}
|
||||||
</if>
|
</if>
|
||||||
|
ORDER BY t1.position_order
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="listBO" parameterType="map" resultMap="shopPositionBO">
|
<select id="listBO" parameterType="map" resultMap="shopPositionBO">
|
||||||
|
@ -3,12 +3,14 @@
|
|||||||
<mapper namespace="cn.com.tenlion.dao.shopstaff.IShopStaffDao">
|
<mapper namespace="cn.com.tenlion.dao.shopstaff.IShopStaffDao">
|
||||||
|
|
||||||
<resultMap id="shopStaffDTO" type="cn.com.tenlion.pojo.dtos.shopstaff.ShopStaffDTO">
|
<resultMap id="shopStaffDTO" type="cn.com.tenlion.pojo.dtos.shopstaff.ShopStaffDTO">
|
||||||
|
<result column="staff_id" property="staffId"/>
|
||||||
<result column="shop_id" property="shopId"/>
|
<result column="shop_id" property="shopId"/>
|
||||||
<result column="user_id" property="userId"/>
|
<result column="user_id" property="userId"/>
|
||||||
<result column="position_id" property="positionId"/>
|
<result column="position_id" property="positionId"/>
|
||||||
<result column="position_name" property="positionName"/>
|
<result column="position_name" property="positionName"/>
|
||||||
<result column="is_leader" property="isLeader"/>
|
<result column="is_leader" property="isLeader"/>
|
||||||
<result column="is_admin" property="isAdmin"/>
|
<result column="is_admin" property="isAdmin"/>
|
||||||
|
<result column="audit_status" property="auditStatus"/>
|
||||||
<result column="gmt_create" property="gmtCreate"/>
|
<result column="gmt_create" property="gmtCreate"/>
|
||||||
<result column="creator" property="creator"/>
|
<result column="creator" property="creator"/>
|
||||||
<result column="gmt_modified" property="gmtModified"/>
|
<result column="gmt_modified" property="gmtModified"/>
|
||||||
@ -16,11 +18,13 @@
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<resultMap id="shopStaffBO" type="cn.com.tenlion.pojo.bos.shopstaff.ShopStaffBO">
|
<resultMap id="shopStaffBO" type="cn.com.tenlion.pojo.bos.shopstaff.ShopStaffBO">
|
||||||
|
<result column="staff_id" property="staffId"/>
|
||||||
<result column="shop_id" property="shopId"/>
|
<result column="shop_id" property="shopId"/>
|
||||||
<result column="user_id" property="userId"/>
|
<result column="user_id" property="userId"/>
|
||||||
<result column="position_id" property="positionId"/>
|
<result column="position_id" property="positionId"/>
|
||||||
<result column="is_leader" property="isLeader"/>
|
<result column="is_leader" property="isLeader"/>
|
||||||
<result column="is_admin" property="isAdmin"/>
|
<result column="is_admin" property="isAdmin"/>
|
||||||
|
<result column="audit_status" property="auditStatus"/>
|
||||||
<result column="gmt_create" property="gmtCreate"/>
|
<result column="gmt_create" property="gmtCreate"/>
|
||||||
<result column="creator" property="creator"/>
|
<result column="creator" property="creator"/>
|
||||||
<result column="gmt_modified" property="gmtModified"/>
|
<result column="gmt_modified" property="gmtModified"/>
|
||||||
@ -29,11 +33,13 @@
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<resultMap id="shopStaffPO" type="cn.com.tenlion.pojo.pos.shopstaff.ShopStaffPO">
|
<resultMap id="shopStaffPO" type="cn.com.tenlion.pojo.pos.shopstaff.ShopStaffPO">
|
||||||
|
<result column="staff_id" property="staffId"/>
|
||||||
<result column="shop_id" property="shopId"/>
|
<result column="shop_id" property="shopId"/>
|
||||||
<result column="user_id" property="userId"/>
|
<result column="user_id" property="userId"/>
|
||||||
<result column="position_id" property="positionId"/>
|
<result column="position_id" property="positionId"/>
|
||||||
<result column="is_leader" property="isLeader"/>
|
<result column="is_leader" property="isLeader"/>
|
||||||
<result column="is_admin" property="isAdmin"/>
|
<result column="is_admin" property="isAdmin"/>
|
||||||
|
<result column="audit_status" property="auditStatus"/>
|
||||||
<result column="gmt_create" property="gmtCreate"/>
|
<result column="gmt_create" property="gmtCreate"/>
|
||||||
<result column="creator" property="creator"/>
|
<result column="creator" property="creator"/>
|
||||||
<result column="gmt_modified" property="gmtModified"/>
|
<result column="gmt_modified" property="gmtModified"/>
|
||||||
@ -43,22 +49,26 @@
|
|||||||
|
|
||||||
<insert id="save" parameterType="map">
|
<insert id="save" parameterType="map">
|
||||||
INSERT INTO svc_shop_staff(
|
INSERT INTO svc_shop_staff(
|
||||||
|
staff_id,
|
||||||
shop_id,
|
shop_id,
|
||||||
user_id,
|
user_id,
|
||||||
position_id,
|
position_id,
|
||||||
is_leader,
|
is_leader,
|
||||||
is_admin,
|
is_admin,
|
||||||
|
audit_status,
|
||||||
gmt_create,
|
gmt_create,
|
||||||
creator,
|
creator,
|
||||||
gmt_modified,
|
gmt_modified,
|
||||||
modifier,
|
modifier,
|
||||||
is_delete
|
is_delete
|
||||||
) VALUES(
|
) VALUES(
|
||||||
|
#{staffId},
|
||||||
#{shopId},
|
#{shopId},
|
||||||
#{userId},
|
#{userId},
|
||||||
#{positionId},
|
#{positionId},
|
||||||
#{isLeader},
|
#{isLeader},
|
||||||
#{isAdmin},
|
#{isAdmin},
|
||||||
|
#{auditStatus},
|
||||||
#{gmtCreate},
|
#{gmtCreate},
|
||||||
#{creator},
|
#{creator},
|
||||||
#{gmtModified},
|
#{gmtModified},
|
||||||
@ -75,12 +85,20 @@
|
|||||||
modifier = #{modifier},
|
modifier = #{modifier},
|
||||||
is_delete = 1
|
is_delete = 1
|
||||||
WHERE
|
WHERE
|
||||||
|
staffIds IN
|
||||||
|
<foreach collection="staffIds" index="index" open="(" separator="," close=")">
|
||||||
|
#{staffIds[${index}]}
|
||||||
|
</foreach>
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<update id="delete" parameterType="map">
|
<update id="delete" parameterType="map">
|
||||||
DELETE FROM
|
DELETE FROM
|
||||||
svc_shop_staff
|
svc_shop_staff
|
||||||
WHERE
|
WHERE
|
||||||
|
staffIds IN
|
||||||
|
<foreach collection="staffIds" index="index" open="(" separator="," close=")">
|
||||||
|
#{staffIds[${index}]}
|
||||||
|
</foreach>
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<update id="update" parameterType="map">
|
<update id="update" parameterType="map">
|
||||||
@ -118,30 +136,35 @@
|
|||||||
is_delete = #{isDelete}
|
is_delete = #{isDelete}
|
||||||
</if>
|
</if>
|
||||||
WHERE
|
WHERE
|
||||||
|
staff_id = #{staffId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<select id="get" parameterType="map" resultMap="shopStaffDTO">
|
<select id="get" parameterType="map" resultMap="shopStaffDTO">
|
||||||
SELECT
|
SELECT
|
||||||
|
t1.staff_id,
|
||||||
t1.shop_id,
|
t1.shop_id,
|
||||||
t1.user_id,
|
t1.user_id,
|
||||||
t1.position_id,
|
t1.position_id,
|
||||||
t1.is_leader,
|
t1.is_leader,
|
||||||
t1.is_admin,
|
t1.is_admin,
|
||||||
t1.gmt_create,
|
t1.audit_status,
|
||||||
1
|
t1.gmt_create
|
||||||
FROM
|
FROM
|
||||||
svc_shop_staff t1
|
svc_shop_staff t1
|
||||||
WHERE
|
WHERE
|
||||||
t1.is_delete = 0
|
t1.is_delete = 0
|
||||||
|
AND staff_id = #{staffId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getBO" parameterType="map" resultMap="shopStaffBO">
|
<select id="getBO" parameterType="map" resultMap="shopStaffBO">
|
||||||
SELECT
|
SELECT
|
||||||
|
t1.staff_id,
|
||||||
t1.shop_id,
|
t1.shop_id,
|
||||||
t1.user_id,
|
t1.user_id,
|
||||||
t1.position_id,
|
t1.position_id,
|
||||||
t1.is_leader,
|
t1.is_leader,
|
||||||
t1.is_admin,
|
t1.is_admin,
|
||||||
|
t1.audit_status,
|
||||||
t1.gmt_create,
|
t1.gmt_create,
|
||||||
t1.creator,
|
t1.creator,
|
||||||
t1.gmt_modified,
|
t1.gmt_modified,
|
||||||
@ -151,15 +174,18 @@
|
|||||||
svc_shop_staff t1
|
svc_shop_staff t1
|
||||||
WHERE
|
WHERE
|
||||||
t1.is_delete = 0
|
t1.is_delete = 0
|
||||||
|
AND staff_id = #{staffId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getPO" parameterType="map" resultMap="shopStaffPO">
|
<select id="getPO" parameterType="map" resultMap="shopStaffPO">
|
||||||
SELECT
|
SELECT
|
||||||
|
t1.staff_id,
|
||||||
t1.shop_id,
|
t1.shop_id,
|
||||||
t1.user_id,
|
t1.user_id,
|
||||||
t1.position_id,
|
t1.position_id,
|
||||||
t1.is_leader,
|
t1.is_leader,
|
||||||
t1.is_admin,
|
t1.is_admin,
|
||||||
|
t1.audit_status,
|
||||||
t1.gmt_create,
|
t1.gmt_create,
|
||||||
t1.creator,
|
t1.creator,
|
||||||
t1.gmt_modified,
|
t1.gmt_modified,
|
||||||
@ -169,15 +195,18 @@
|
|||||||
svc_shop_staff t1
|
svc_shop_staff t1
|
||||||
WHERE
|
WHERE
|
||||||
t1.is_delete = 0
|
t1.is_delete = 0
|
||||||
|
AND staff_id = #{staffId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="list" parameterType="map" resultMap="shopStaffDTO">
|
<select id="list" parameterType="map" resultMap="shopStaffDTO">
|
||||||
SELECT
|
SELECT
|
||||||
|
t1.staff_id,
|
||||||
t1.shop_id,
|
t1.shop_id,
|
||||||
t1.user_id,
|
t1.user_id,
|
||||||
t1.position_id,
|
t1.position_id,
|
||||||
t1.is_leader,
|
t1.is_leader,
|
||||||
t1.is_admin,
|
t1.is_admin,
|
||||||
|
t1.audit_status,
|
||||||
t2.position_name
|
t2.position_name
|
||||||
FROM
|
FROM
|
||||||
svc_shop_staff t1
|
svc_shop_staff t1
|
||||||
@ -206,11 +235,13 @@
|
|||||||
|
|
||||||
<select id="listBO" parameterType="map" resultMap="shopStaffBO">
|
<select id="listBO" parameterType="map" resultMap="shopStaffBO">
|
||||||
SELECT
|
SELECT
|
||||||
|
t1.staff_id,
|
||||||
t1.shop_id,
|
t1.shop_id,
|
||||||
t1.user_id,
|
t1.user_id,
|
||||||
t1.position_id,
|
t1.position_id,
|
||||||
t1.is_leader,
|
t1.is_leader,
|
||||||
t1.is_admin,
|
t1.is_admin,
|
||||||
|
t1.audit_status,
|
||||||
t1.gmt_create,
|
t1.gmt_create,
|
||||||
t1.creator,
|
t1.creator,
|
||||||
t1.gmt_modified,
|
t1.gmt_modified,
|
||||||
@ -237,11 +268,13 @@
|
|||||||
|
|
||||||
<select id="listPO" parameterType="map" resultMap="shopStaffPO">
|
<select id="listPO" parameterType="map" resultMap="shopStaffPO">
|
||||||
SELECT
|
SELECT
|
||||||
|
t1.staff_id,
|
||||||
t1.shop_id,
|
t1.shop_id,
|
||||||
t1.user_id,
|
t1.user_id,
|
||||||
t1.position_id,
|
t1.position_id,
|
||||||
t1.is_leader,
|
t1.is_leader,
|
||||||
t1.is_admin,
|
t1.is_admin,
|
||||||
|
t1.audit_status,
|
||||||
t1.gmt_create,
|
t1.gmt_create,
|
||||||
t1.creator,
|
t1.creator,
|
||||||
t1.gmt_modified,
|
t1.gmt_modified,
|
||||||
|
@ -35,6 +35,8 @@
|
|||||||
<script type="text/html" id="barDemo">
|
<script type="text/html" id="barDemo">
|
||||||
<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="show">详情</a>
|
<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="show">详情</a>
|
||||||
<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="staff">人员</a>
|
<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="staff">人员</a>
|
||||||
|
<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="position">职位</a>
|
||||||
|
<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="member">会员</a>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -78,7 +80,7 @@
|
|||||||
[
|
[
|
||||||
{type:'checkbox', fixed: 'left'},
|
{type:'checkbox', fixed: 'left'},
|
||||||
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
||||||
{field:'cz', width:180, title: '操作', align:'center', toolbar: '#barDemo'},
|
{field:'cz', width:220, title: '操作', align:'center', toolbar: '#barDemo'},
|
||||||
{field: 'shopLogo', width: 180, title: '店铺LOGO', align:'center',
|
{field: 'shopLogo', width: 180, title: '店铺LOGO', align:'center',
|
||||||
templet: function(row) {
|
templet: function(row) {
|
||||||
var rowData = row[this.field];
|
var rowData = row[this.field];
|
||||||
@ -129,7 +131,7 @@
|
|||||||
return rowData;
|
return rowData;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{field: 'creator', width: 180, title: '注册人', align:'center',
|
{field: 'creatorName', width: 180, title: '注册人', align:'center',
|
||||||
templet: function(row) {
|
templet: function(row) {
|
||||||
var rowData = row[this.field];
|
var rowData = row[this.field];
|
||||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
@ -303,7 +305,7 @@
|
|||||||
reloadTable();
|
reloadTable();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else if (event === 'staff'){
|
}else if (event === 'staff'){
|
||||||
layer.open({
|
layer.open({
|
||||||
type: 2,
|
type: 2,
|
||||||
title: false,
|
title: false,
|
||||||
@ -316,6 +318,32 @@
|
|||||||
reloadTable();
|
reloadTable();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
} else if (event === 'position'){
|
||||||
|
layer.open({
|
||||||
|
type: 2,
|
||||||
|
title: false,
|
||||||
|
closeBtn: 0,
|
||||||
|
area: ['90%', '90%'],
|
||||||
|
shadeClose: true,
|
||||||
|
anim: 2,
|
||||||
|
content: top.restAjax.path('route/shopposition/list.html?shopId={shopId}', [data.shopId]),
|
||||||
|
end: function () {
|
||||||
|
reloadTable();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else if (event === 'member'){
|
||||||
|
layer.open({
|
||||||
|
type: 2,
|
||||||
|
title: false,
|
||||||
|
closeBtn: 0,
|
||||||
|
area: ['90%', '90%'],
|
||||||
|
shadeClose: true,
|
||||||
|
anim: 2,
|
||||||
|
content: top.restAjax.path('route/shopmember/list.html?shopId={shopId}', [data.shopId]),
|
||||||
|
end: function () {
|
||||||
|
reloadTable();
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
<label class="layui-form-label">店铺LOGO</label>
|
<label class="layui-form-label">店铺LOGO</label>
|
||||||
<div class="layui-input-block" id="logview">
|
<div class="layui-input-block" id="logview">
|
||||||
<input type="hidden" id="shopLogo" name="shopLogo">
|
<input type="hidden" id="shopLogo" name="shopLogo">
|
||||||
<img src="" id="showLogoImg" style="height: 100px;width: 100px">
|
<img src="" id="showLogoImg" style="height: 100px;width: 100px;margin-left: 20px">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
@ -38,8 +38,8 @@
|
|||||||
<div class="layui-form-item layui-form-text">
|
<div class="layui-form-item layui-form-text">
|
||||||
<label class="layui-form-label">店铺简介</label>
|
<label class="layui-form-label">店铺简介</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<textarea id="shopSummary" name="shopSummary" class="layui-textarea" placeholder="请输入店铺简介" readonly="readonly"></textarea>
|
<textarea id="shopSummary" name="shopSummary" class="layui-textarea" placeholder="请输入店铺简介" readonly="readonly"></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label">店铺地址</label>
|
<label class="layui-form-label">店铺地址</label>
|
||||||
|
@ -34,12 +34,12 @@
|
|||||||
<!-- 表头按钮组 -->
|
<!-- 表头按钮组 -->
|
||||||
<script type="text/html" id="headerToolBar">
|
<script type="text/html" id="headerToolBar">
|
||||||
<div class="layui-btn-group">
|
<div class="layui-btn-group">
|
||||||
<button type="button" class="layui-btn layui-btn-sm" lay-event="saveEvent">
|
<!-- <button type="button" class="layui-btn layui-btn-sm" lay-event="saveEvent">
|
||||||
<i class="fa fa-lg fa-plus"></i> 新增
|
<i class="fa fa-lg fa-plus"></i> 新增
|
||||||
</button>
|
</button>
|
||||||
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="updateEvent">
|
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="updateEvent">
|
||||||
<i class="fa fa-lg fa-edit"></i> 编辑
|
<i class="fa fa-lg fa-edit"></i> 编辑
|
||||||
</button>
|
</button>-->
|
||||||
<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="removeEvent">
|
<button type="button" class="layui-btn layui-btn-danger layui-btn-sm" lay-event="removeEvent">
|
||||||
<i class="fa fa-lg fa-trash"></i> 删除
|
<i class="fa fa-lg fa-trash"></i> 删除
|
||||||
</button>
|
</button>
|
||||||
@ -65,14 +65,15 @@
|
|||||||
var laydate = layui.laydate;
|
var laydate = layui.laydate;
|
||||||
var common = layui.common;
|
var common = layui.common;
|
||||||
var resizeTimeout = null;
|
var resizeTimeout = null;
|
||||||
var tableUrl = 'api/shopmember/listpage';
|
var tableUrl = 'api/shopmember/listpagebyshopid/{shopId}';
|
||||||
|
var shopId = top.restAjax.params(window.location.href).shopId;
|
||||||
|
|
||||||
// 初始化表格
|
// 初始化表格
|
||||||
function initTable() {
|
function initTable() {
|
||||||
table.render({
|
table.render({
|
||||||
elem: '#dataTable',
|
elem: '#dataTable',
|
||||||
id: 'dataTable',
|
id: 'dataTable',
|
||||||
url: top.restAjax.path(tableUrl, []),
|
url: top.restAjax.path(tableUrl, [shopId]),
|
||||||
width: admin.screen() > 1 ? '100%' : '',
|
width: admin.screen() > 1 ? '100%' : '',
|
||||||
height: $win.height() - 90,
|
height: $win.height() - 90,
|
||||||
limit: 20,
|
limit: 20,
|
||||||
@ -86,7 +87,7 @@
|
|||||||
[
|
[
|
||||||
{type:'checkbox', fixed: 'left'},
|
{type:'checkbox', fixed: 'left'},
|
||||||
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
||||||
{field: 'shopId', width: 180, title: '店铺ID', align:'center',
|
{field: 'userName', width: 180, title: '用户姓名', align:'center',
|
||||||
templet: function(row) {
|
templet: function(row) {
|
||||||
var rowData = row[this.field];
|
var rowData = row[this.field];
|
||||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
@ -95,7 +96,7 @@
|
|||||||
return rowData;
|
return rowData;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{field: 'userId', width: 180, title: '用户ID', align:'center',
|
{field: 'userUserName', width: 180, title: '用户名', align:'center',
|
||||||
templet: function(row) {
|
templet: function(row) {
|
||||||
var rowData = row[this.field];
|
var rowData = row[this.field];
|
||||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
@ -138,7 +139,7 @@
|
|||||||
// 重载表格
|
// 重载表格
|
||||||
function reloadTable(currentPage) {
|
function reloadTable(currentPage) {
|
||||||
table.reload('dataTable', {
|
table.reload('dataTable', {
|
||||||
url: top.restAjax.path(tableUrl, []),
|
url: top.restAjax.path(tableUrl, [shopId]),
|
||||||
where: {
|
where: {
|
||||||
keywords: $('#keywords').val(),
|
keywords: $('#keywords').val(),
|
||||||
startTime: $('#startTime').val(),
|
startTime: $('#startTime').val(),
|
||||||
|
@ -34,9 +34,9 @@
|
|||||||
<!-- 表头按钮组 -->
|
<!-- 表头按钮组 -->
|
||||||
<script type="text/html" id="headerToolBar">
|
<script type="text/html" id="headerToolBar">
|
||||||
<div class="layui-btn-group">
|
<div class="layui-btn-group">
|
||||||
<button type="button" class="layui-btn layui-btn-sm" lay-event="saveEvent">
|
<!-- <button type="button" class="layui-btn layui-btn-sm" lay-event="saveEvent">
|
||||||
<i class="fa fa-lg fa-plus"></i> 新增
|
<i class="fa fa-lg fa-plus"></i> 新增
|
||||||
</button>
|
</button>-->
|
||||||
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="updateEvent">
|
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="updateEvent">
|
||||||
<i class="fa fa-lg fa-edit"></i> 编辑
|
<i class="fa fa-lg fa-edit"></i> 编辑
|
||||||
</button>
|
</button>
|
||||||
@ -65,14 +65,15 @@
|
|||||||
var laydate = layui.laydate;
|
var laydate = layui.laydate;
|
||||||
var common = layui.common;
|
var common = layui.common;
|
||||||
var resizeTimeout = null;
|
var resizeTimeout = null;
|
||||||
var tableUrl = 'api/shopposition/listpage';
|
var tableUrl = 'api/shopposition/listpagebyshopid/{shopId}';
|
||||||
|
var shopId = top.restAjax.params(window.location.href).shopId;
|
||||||
|
|
||||||
// 初始化表格
|
// 初始化表格
|
||||||
function initTable() {
|
function initTable() {
|
||||||
table.render({
|
table.render({
|
||||||
elem: '#dataTable',
|
elem: '#dataTable',
|
||||||
id: 'dataTable',
|
id: 'dataTable',
|
||||||
url: top.restAjax.path(tableUrl, []),
|
url: top.restAjax.path(tableUrl, [shopId]),
|
||||||
width: admin.screen() > 1 ? '100%' : '',
|
width: admin.screen() > 1 ? '100%' : '',
|
||||||
height: $win.height() - 90,
|
height: $win.height() - 90,
|
||||||
limit: 20,
|
limit: 20,
|
||||||
@ -86,15 +87,6 @@
|
|||||||
[
|
[
|
||||||
{type:'checkbox', fixed: 'left'},
|
{type:'checkbox', fixed: 'left'},
|
||||||
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
|
||||||
{field: 'shopId', width: 180, title: '店铺', align:'center',
|
|
||||||
templet: function(row) {
|
|
||||||
var rowData = row[this.field];
|
|
||||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
|
||||||
return '-';
|
|
||||||
}
|
|
||||||
return rowData;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{field: 'positionName', width: 180, title: '职位名称', align:'center',
|
{field: 'positionName', width: 180, title: '职位名称', align:'center',
|
||||||
templet: function(row) {
|
templet: function(row) {
|
||||||
var rowData = row[this.field];
|
var rowData = row[this.field];
|
||||||
@ -131,7 +123,7 @@
|
|||||||
return rowData;
|
return rowData;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{field: 'creator', width: 180, title: '创建人', align:'center',
|
{field: 'creatorName', width: 180, title: '创建人', align:'center',
|
||||||
templet: function(row) {
|
templet: function(row) {
|
||||||
var rowData = row[this.field];
|
var rowData = row[this.field];
|
||||||
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
|
||||||
@ -156,7 +148,7 @@
|
|||||||
// 重载表格
|
// 重载表格
|
||||||
function reloadTable(currentPage) {
|
function reloadTable(currentPage) {
|
||||||
table.reload('dataTable', {
|
table.reload('dataTable', {
|
||||||
url: top.restAjax.path(tableUrl, []),
|
url: top.restAjax.path(tableUrl, [shopId]),
|
||||||
where: {
|
where: {
|
||||||
keywords: $('#keywords').val(),
|
keywords: $('#keywords').val(),
|
||||||
startTime: $('#startTime').val(),
|
startTime: $('#startTime').val(),
|
||||||
@ -246,7 +238,7 @@
|
|||||||
area: ['100%', '100%'],
|
area: ['100%', '100%'],
|
||||||
shadeClose: true,
|
shadeClose: true,
|
||||||
anim: 2,
|
anim: 2,
|
||||||
content: top.restAjax.path('route/shopposition/update.html?shopPositionId={shopPositionId}', [checkDatas[0].shopPositionId]),
|
content: top.restAjax.path('route/shopposition/update.html?shopPositionId={shopPositionId}', [checkDatas[0].positionId]),
|
||||||
end: function() {
|
end: function() {
|
||||||
reloadTable();
|
reloadTable();
|
||||||
}
|
}
|
||||||
@ -261,7 +253,7 @@
|
|||||||
if(i > 1) {
|
if(i > 1) {
|
||||||
ids += '_';
|
ids += '_';
|
||||||
}
|
}
|
||||||
ids += item['shopPositionId'];
|
ids += item['positionId'];
|
||||||
}
|
}
|
||||||
removeData(ids);
|
removeData(ids);
|
||||||
}
|
}
|
||||||
|
@ -22,18 +22,18 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="layui-card-body" style="padding: 15px;">
|
<div class="layui-card-body" style="padding: 15px;">
|
||||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||||
<div class="layui-form-item">
|
<!--<div class="layui-form-item">-->
|
||||||
<label class="layui-form-label">职位ID</label>
|
<!--<label class="layui-form-label">职位ID</label>-->
|
||||||
<div class="layui-input-block">
|
<!--<div class="layui-input-block">-->
|
||||||
<input type="text" id="positionId" name="positionId" class="layui-input" value="" placeholder="请输入职位ID" maxlength="36">
|
<!--<input type="text" id="positionId" name="positionId" class="layui-input" value="" placeholder="请输入职位ID" maxlength="36">-->
|
||||||
</div>
|
<!--</div>-->
|
||||||
</div>
|
<!--</div>-->
|
||||||
<div class="layui-form-item">
|
<!--<div class="layui-form-item">-->
|
||||||
<label class="layui-form-label">店铺ID</label>
|
<!--<label class="layui-form-label">店铺ID</label>-->
|
||||||
<div class="layui-input-block">
|
<!--<div class="layui-input-block">-->
|
||||||
<input type="text" id="shopId" name="shopId" class="layui-input" value="" placeholder="请输入店铺ID" maxlength="36">
|
<!--<input type="text" id="shopId" name="shopId" class="layui-input" value="" placeholder="请输入店铺ID" maxlength="36">-->
|
||||||
</div>
|
<!--</div>-->
|
||||||
</div>
|
<!--</div>-->
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label">职位名称</label>
|
<label class="layui-form-label">职位名称</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
@ -55,7 +55,7 @@
|
|||||||
<div class="layui-form-item layui-layout-admin">
|
<div class="layui-form-item layui-layout-admin">
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<div class="layui-footer" style="left: 0;">
|
<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" lay-submit lay-filter="submitForm">提交编辑</button>-->
|
||||||
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
|
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -34,9 +34,9 @@
|
|||||||
<!-- 表头按钮组 -->
|
<!-- 表头按钮组 -->
|
||||||
<script type="text/html" id="headerToolBar">
|
<script type="text/html" id="headerToolBar">
|
||||||
<div class="layui-btn-group">
|
<div class="layui-btn-group">
|
||||||
<button type="button" class="layui-btn layui-btn-sm" lay-event="saveEvent">
|
<!--<button type="button" class="layui-btn layui-btn-sm" lay-event="saveEvent">-->
|
||||||
<i class="fa fa-lg fa-plus"></i> 新增
|
<!--<i class="fa fa-lg fa-plus"></i> 新增-->
|
||||||
</button>
|
<!--</button>-->
|
||||||
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="updateEvent">
|
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-event="updateEvent">
|
||||||
<i class="fa fa-lg fa-edit"></i> 编辑
|
<i class="fa fa-lg fa-edit"></i> 编辑
|
||||||
</button>
|
</button>
|
||||||
@ -238,7 +238,7 @@
|
|||||||
area: ['100%', '100%'],
|
area: ['100%', '100%'],
|
||||||
shadeClose: true,
|
shadeClose: true,
|
||||||
anim: 2,
|
anim: 2,
|
||||||
content: top.restAjax.path('route/shopstaff/update.html?shopStaffId={shopStaffId}', [checkDatas[0].shopStaffId]),
|
content: top.restAjax.path('route/shopstaff/update.html?shopStaffId={shopStaffId}', [checkDatas[0].staffId]),
|
||||||
end: function() {
|
end: function() {
|
||||||
reloadTable();
|
reloadTable();
|
||||||
}
|
}
|
||||||
@ -253,7 +253,7 @@
|
|||||||
if(i > 1) {
|
if(i > 1) {
|
||||||
ids += '_';
|
ids += '_';
|
||||||
}
|
}
|
||||||
ids += item['shopStaffId'];
|
ids += item['staffId'];
|
||||||
}
|
}
|
||||||
removeData(ids);
|
removeData(ids);
|
||||||
}
|
}
|
||||||
|
@ -22,46 +22,45 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="layui-card-body" style="padding: 15px;">
|
<div class="layui-card-body" style="padding: 15px;">
|
||||||
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
<form class="layui-form layui-form-pane" lay-filter="dataForm">
|
||||||
|
<!--<div class="layui-form-item">-->
|
||||||
|
<!--<label class="layui-form-label">店铺ID</label>-->
|
||||||
|
<!--<div class="layui-input-block">-->
|
||||||
|
<!--<input type="text" id="shopId" name="shopId" class="layui-input" value="" placeholder="请输入店铺ID" maxlength="36">-->
|
||||||
|
<!--</div>-->
|
||||||
|
<!--</div>-->
|
||||||
|
<input type="hidden" id="shopId" name="shopId" class="layui-input" value="" placeholder="请输入店铺ID" maxlength="36">
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label">店铺ID</label>
|
<label class="layui-form-label">姓名</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input type="text" id="shopId" name="shopId" class="layui-input" value="" placeholder="请输入店铺ID" maxlength="36">
|
<input type="hidden" id="userId" name="userId" class="layui-input" value="" placeholder="请输入员工ID" maxlength="36">
|
||||||
|
<input type="text" id="userName" name="userName" class="layui-input" value="" readonly="readonly">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label">员工ID</label>
|
<label class="layui-form-label">职位</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input type="text" id="userId" name="userId" class="layui-input" value="" placeholder="请输入员工ID" maxlength="36">
|
<input type="hidden" id="positionId" name="positionId" class="layui-input" value="" placeholder="请输入职位ID" maxlength="36">
|
||||||
|
<input type="text" id="positionName" name="positionName" class="layui-input" value="" readonly="readonly">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label">职位ID</label>
|
<label class="layui-form-label">店长</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input type="text" id="positionId" name="positionId" class="layui-input" value="" placeholder="请输入职位ID" maxlength="36">
|
<input type="hidden" id="isLeader" name="isLeader" class="layui-input" value="" placeholder="请输入是否店长(领导) 0否 1是" lay-verify="required">
|
||||||
|
<input type="text" id="isLeaderName" name="isLeaderName" class="layui-input" value="" placeholder="请输入是否店长(领导) 0否 1是" lay-verify="required" readonly="readonly">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<label class="layui-form-label">是否店长(领导) 0否 1是</label>
|
<label class="layui-form-label">管理员</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input type="number" id="isLeader" name="isLeader" class="layui-input" value="" placeholder="请输入是否店长(领导) 0否 1是" lay-verify="required">
|
<input type="hidden" id="isAdmin" name="isAdmin" class="layui-input" value="" placeholder="请输入是否为管理员" lay-verify="required">
|
||||||
</div>
|
<input type="text" id="isAdminName" name="isAdminName" class="layui-input" value="" placeholder="请输入是否为管理员" lay-verify="required" readonly="readonly">
|
||||||
</div>
|
|
||||||
<div class="layui-form-item">
|
|
||||||
<label class="layui-form-label">是否为管理员</label>
|
|
||||||
<div class="layui-input-block">
|
|
||||||
<input type="number" id="isAdmin" name="isAdmin" class="layui-input" value="" placeholder="请输入是否为管理员" 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="gmtCreate" name="gmtCreate" class="layui-input" value="" placeholder="请选择创建时间" lay-verify="required" readonly style="cursor: pointer;">
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item layui-layout-admin">
|
<div class="layui-form-item layui-layout-admin">
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<div class="layui-footer" style="left: 0;">
|
<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" lay-submit lay-filter="submitForm">提交编辑</button>-->
|
||||||
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
|
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -144,15 +143,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 初始化创建时间时间戳
|
|
||||||
function initGmtCreateDateTime() {
|
|
||||||
laydate.render({
|
|
||||||
elem: '#gmtCreate',
|
|
||||||
type: 'datetime',
|
|
||||||
value: new Date(),
|
|
||||||
trigger: 'click'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// 初始化内容
|
// 初始化内容
|
||||||
@ -163,9 +154,19 @@
|
|||||||
for(var i in data) {
|
for(var i in data) {
|
||||||
dataFormData[i] = data[i] +'';
|
dataFormData[i] = data[i] +'';
|
||||||
}
|
}
|
||||||
|
if(data.isLeader == 0){
|
||||||
|
dataFormData['isLeaderName'] = "否";
|
||||||
|
}else{
|
||||||
|
dataFormData['isLeaderName'] = "是";
|
||||||
|
}
|
||||||
|
if(data.isAdmin == 0){
|
||||||
|
dataFormData['isAdminName'] = "否";
|
||||||
|
}else{
|
||||||
|
dataFormData['isAdminName'] = "是";
|
||||||
|
}
|
||||||
|
|
||||||
form.val('dataForm', dataFormData);
|
form.val('dataForm', dataFormData);
|
||||||
form.render(null, 'dataForm');
|
form.render(null, 'dataForm');
|
||||||
initGmtCreateDateTime();
|
|
||||||
}, function(code, data) {
|
}, function(code, data) {
|
||||||
top.dialog.msg(data.msg);
|
top.dialog.msg(data.msg);
|
||||||
}, function() {
|
}, function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user