Commit 655297a5 authored by 燕南天's avatar 燕南天

Merge branch 'master' of gitlab.fqyxa.com:luoyangfei/store-system

parents 650bca95 7499e1f7
package cn.com.fqy.controller.mgt;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import cn.com.fqy.common.ResultInfo;
import cn.com.fqy.common.constants.Constant;
import cn.com.fqy.core.common.BaseController;
import cn.com.fqy.core.common.PageFinder;
import cn.com.fqy.core.model.DataDictCat;
import cn.com.fqy.core.model.Query;
import cn.com.fqy.core.service.DataDictCatService;
import cn.com.fqy.core.service.DataDictItemService;
@Controller
@RequestMapping("dataDictCat")
public class DataDictCatController extends BaseController {
@Resource
private DataDictCatService dataDictCatService;
@Resource
private DataDictItemService dataDictItemService;
/**
* 数据字典分类查询
*
* @param dataDictCat
* @param pageNo
* @param pageSize
* @return
*/
@RequestMapping("getDataDictList")
@ResponseBody
public PageFinder<DataDictCat> dataDictPageList(@ModelAttribute("DataDictCat") DataDictCat dataDictCat, @RequestParam("pageNo") int pageNo,
@RequestParam("pageSize") int pageSize) {
Query q = new Query(pageNo, pageSize, dataDictCat);
return dataDictCatService.getDataDictCatPagedList(q);
}
/**
* 数据字典分类增加
*
* @param dataDictCat
* @return
*/
@RequestMapping("addOrEditDataDictCat")
@ResponseBody
public ResultInfo<DataDictCat> addOrEditDataDictCat(@ModelAttribute("DataDictCat") DataDictCat dataDictCat,String type) {
ResultInfo<DataDictCat> resultInfo = new ResultInfo<DataDictCat>();
if (dataDictCat.getDataDictCatCode()!=null&&!"".equals(dataDictCat.getDataDictCatCode())) {
DataDictCat dtc =dataDictCatService.getDataDictCat(dataDictCat.getDataDictCatCode());
if (type.equals("add")) {
if(dtc != null){
resultInfo.setCode(Constant.FAIL);
resultInfo.setMsg("分类编码重复");
return resultInfo;
}else {
resultInfo = dataDictCatService.addDataDictCat(dataDictCat, getOperator());
}
}else if(type.equals("edit")){
resultInfo = dataDictCatService.updateDataDictCat(dataDictCat, getOperator());
}else {
resultInfo.setCode(Constant.FAIL);
resultInfo.setMsg("参数错误");
return resultInfo;
}
}else {
resultInfo.setCode(Constant.FAIL);
resultInfo.setMsg("分类编码为空");
}
return resultInfo;
}
/**
* 数据字典分类删除
*
* @param dataDictCatCode
* @return
*/
@RequestMapping("delDataDict")
@ResponseBody
public ResultInfo<DataDictCat> delDataDict(@RequestParam("dataDictCatCode") String dataDictCatCode) {
return dataDictCatService.delDataDictCat(dataDictCatCode, getOperator());
}
/**
* 数据字典分类查询
*
* @param dataDictCat
* @param pageNo
* @param pageSize
* @return
*/
@RequestMapping("getDataDicts")
@ResponseBody
public ResultInfo<List<DataDictCat>> getDataDicts(){
ResultInfo<List<DataDictCat>> result = new ResultInfo<>();
DataDictCat dataDictCat = new DataDictCat();
dataDictCat.setIsAvailable(1);
List<DataDictCat> list = dataDictCatService.getDataDictCatList(new Query(dataDictCat));
if (list.size()>0) {
result.setCode("1");
result.setData(list);
}else {
result.setCode("0");
result.setMsg("暂无数据");
}
return result;
}
}
package cn.com.fqy.controller.mgt;
import java.util.Date;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import cn.com.fqy.common.ResultInfo;
import cn.com.fqy.common.constants.Constant;
import cn.com.fqy.core.common.BaseController;
import cn.com.fqy.core.common.PageFinder;
import cn.com.fqy.core.model.DataDictItem;
import cn.com.fqy.core.model.Query;
import cn.com.fqy.core.service.DataDictCatService;
import cn.com.fqy.core.service.DataDictItemService;
@Controller
@RequestMapping("dataDictItem")
public class DataDictItemController extends BaseController {
@Resource
private DataDictCatService dataDictCatService;
@Resource
private DataDictItemService dataDictItemService;
/**
* 数据字典项查询
*
* @param dataDictCatItem
* @param pageNo
* @param pageSize
* @return
*/
@RequestMapping("getDataDictItemList")
@ResponseBody
public PageFinder<DataDictItem> dataDictItemPageList(@ModelAttribute("DataDictItem") DataDictItem dataDictCatItem, Query query) {
Query q = new Query(query.getPageNo(), query.getPageSize(), dataDictCatItem);
return dataDictItemService.getDataDictItemPagedList(q);
}
/**
*数据字典项增加编辑
*
* @param dataDictCatItem
* @return
*/
@RequestMapping("addOrEditDataDictItem")
@ResponseBody
public ResultInfo<DataDictItem> addDataDictItem(@ModelAttribute("DataDictItem") DataDictItem dataDictItem) {
ResultInfo<DataDictItem> resultInfo = new ResultInfo<DataDictItem>();
if (dataDictItem.getDataDictItemId()!=null&&!"".equals(dataDictItem.getDataDictItemId())) {
if (dataDictItem.getItemValue()!=null&&!"".equals(dataDictItem.getItemValue())) {
DataDictItem dataDictItemQuery = new DataDictItem();
dataDictItemQuery.setDataDictCatCode(dataDictItem.getDataDictCatCode());
dataDictItemQuery.setItemValue(dataDictItem.getItemValue());
Query q = new Query(dataDictItemQuery);
List<DataDictItem> dataDictItems=dataDictItemService.getDataDictItemList(q);
if(dataDictItems.size()>0 && !dataDictItems.get(0).getDataDictItemId().equals(dataDictItem.getDataDictItemId())){
resultInfo.setCode(Constant.FAIL);
resultInfo.setMsg("数据字典项值有重复");
return resultInfo;
}
}
if (dataDictItem.getIsAvailable()!=null) {
dataDictItem.setAvailableUpdateTime(new Date());
}
resultInfo= dataDictItemService.updateDataDictItem(dataDictItem, getOperator());
}else {
DataDictItem dataDictItemQuery = new DataDictItem();
dataDictItemQuery.setDataDictCatCode(dataDictItem.getDataDictCatCode());
dataDictItemQuery.setItemValue(dataDictItem.getItemValue());
Query q = new Query(dataDictItemQuery);
List<DataDictItem> dataDictItems=dataDictItemService.getDataDictItemList(q);
if(dataDictItems.size()>0 ){
resultInfo.setCode(Constant.FAIL);
resultInfo.setMsg("数据字典项值有重复");
return resultInfo;
}
resultInfo= dataDictItemService.addDataDictItem(dataDictItem, getOperator());
}
return resultInfo;
}
/**
* 数据字典分类查询
*
* @param dataDictCat
* @param pageNo
* @param pageSize
* @return
*/
@RequestMapping("getDataDictItems")
@ResponseBody
public ResultInfo<List<DataDictItem>> getDataDicts(){
ResultInfo<List<DataDictItem>> result = new ResultInfo<>();
DataDictItem dataDictItem = new DataDictItem();
dataDictItem.setIsAvailable(1);
dataDictItem.setIsDeleted(0);
dataDictItem.setDataDictCatCode("UES_INSTACTION");
List<DataDictItem> list = dataDictItemService.getDataDictItemList(new Query(dataDictItem));
if (list.size()>0) {
result.setCode("1");
result.setData(list);
}else {
result.setCode("0");
result.setMsg("暂无数据");
}
return result;
}
/**
* 数据字典分类查询
*
* @param dataDictCat
* @param pageNo
* @param pageSize
* @return
*/
@RequestMapping("getDataDictsBox")
@ResponseBody
public ResultInfo<List<DataDictItem>> getDataDictsBox(){
ResultInfo<List<DataDictItem>> result = new ResultInfo<>();
DataDictItem dataDictItem = new DataDictItem();
dataDictItem.setIsAvailable(1);
dataDictItem.setIsDeleted(0);
dataDictItem.setDataDictCatCode("BOX_TYPE");
List<DataDictItem> list = dataDictItemService.getDataDictItemList(new Query(dataDictItem));
if (list.size()>0) {
result.setCode("1");
result.setData(list);
}else {
result.setCode("0");
result.setMsg("暂无数据");
}
return result;
}
/**
* 数据字典项删除
*
* @param dataDictCatId
* @return
*/
@RequestMapping("delDataDictItem")
@ResponseBody
public ResultInfo<DataDictItem> delDataDictItem(@RequestParam("dataDictItemId") String dataDictItemId) {
return dataDictItemService.delDataDictItem(dataDictItemId, getOperator());
}
}
...@@ -80,6 +80,7 @@ public class SysUserController extends BaseController { ...@@ -80,6 +80,7 @@ public class SysUserController extends BaseController {
sysUser.setMobilePhone(sysUserRoleIds.getMobilePhone()); sysUser.setMobilePhone(sysUserRoleIds.getMobilePhone());
sysUser.setSex(sysUserRoleIds.getSex()); sysUser.setSex(sysUserRoleIds.getSex());
sysUser.setDeptId(sysUserRoleIds.getDeptId()); sysUser.setDeptId(sysUserRoleIds.getDeptId());
sysUser.setAdministratorsId(sysUserRoleIds.getAdministratorsId());
if (sysUserRoleIds.getSysRole()!=null) { if (sysUserRoleIds.getSysRole()!=null) {
String[] roleIds = sysUserRoleIds.getSysRole(); String[] roleIds = sysUserRoleIds.getSysRole();
List<SysRole> sysRoles = new ArrayList<SysRole>(); List<SysRole> sysRoles = new ArrayList<SysRole>();
......
package cn.com.fqy.core.dao;
import cn.com.fqy.core.common.BaseDao;
import cn.com.fqy.core.model.DataDictCat;
/**
* 数据字典的分类表 数据库处理类
*/
public interface DataDictCatDao extends BaseDao<DataDictCat,String> {
}
package cn.com.fqy.core.dao;
import java.util.List;
import cn.com.fqy.core.common.BaseDao;
import cn.com.fqy.core.model.DataDictItem;
/**
* 数据字典的明细项表 数据库处理类
*/
public interface DataDictItemDao extends BaseDao<DataDictItem,String> {
public List<DataDictItem> getDataDictCatCode();
}
package cn.com.fqy.core.model;
import java.util.Date;
import cn.com.fqy.common.Entity;
/**
* 数据字典的分类表 数据实体类
*/
public class DataDictCat extends Entity<String> {
private static final long serialVersionUID = 1l;
/*Auto generated properties start*/
//数据字典分类代码(根据业务自定,如城市:CITY)
private String dataDictCatCode;
//数据字典分类名称
private String dataDictCatName;
//父分类代码(如果无父分类,则此字段值为null)
private String parentCatCode;
//备注
private String memo;
//是否可用(1、可用,0、不可用,默认1)
private Integer isAvailable;
//是否已删除(1、已删除,0、未删除,默认0)
private Integer isDeleted;
//创建时间
private Date createTime;
//创建时间 时间范围起(查询用)
private Date createTimeStart;
//创建时间 时间范围止(查询用)
private Date createTimeEnd;
//更新时间
private Date updateTime;
//更新时间 时间范围起(查询用)
private Date updateTimeStart;
//更新时间 时间范围止(查询用)
private Date updateTimeEnd;
////操作人类型(0、系统自动操作,1、平台人员操作,2、商家人员操作,3、会员操作)
private Integer operatorType;
//操作人id
private String operatorId;
/*Auto generated properties end*/
/*Customized properties start*/
/*Customized properties end*/
/*Auto generated methods start*/
@Override
public String getPK(){
return dataDictCatCode;
}
public String getDataDictCatCode(){
return dataDictCatCode;
}
public void setDataDictCatCode(String dataDictCatCode){
this.dataDictCatCode = dataDictCatCode;
}
public String getDataDictCatName(){
return dataDictCatName;
}
public void setDataDictCatName(String dataDictCatName){
this.dataDictCatName = dataDictCatName;
}
public String getParentCatCode(){
return parentCatCode;
}
public void setParentCatCode(String parentCatCode){
this.parentCatCode = parentCatCode;
}
public String getMemo(){
return memo;
}
public void setMemo(String memo){
this.memo = memo;
}
public Integer getIsAvailable(){
return isAvailable;
}
public void setIsAvailable(Integer isAvailable){
this.isAvailable = isAvailable;
}
public Integer getIsDeleted(){
return isDeleted;
}
public void setIsDeleted(Integer isDeleted){
this.isDeleted = isDeleted;
}
public Date getCreateTime(){
return createTime;
}
public void setCreateTime(Date createTime){
this.createTime = createTime;
}
public Date getCreateTimeStart(){
return createTimeStart;
}
public void setCreateTimeStart(Date createTimeStart){
this.createTimeStart = createTimeStart;
}
public Date getCreateTimeEnd(){
return createTimeEnd;
}
public void setCreateTimeEnd(Date createTimeEnd){
this.createTimeEnd = createTimeEnd;
}
public Date getUpdateTime(){
return updateTime;
}
public void setUpdateTime(Date updateTime){
this.updateTime = updateTime;
}
public Date getUpdateTimeStart(){
return updateTimeStart;
}
public void setUpdateTimeStart(Date updateTimeStart){
this.updateTimeStart = updateTimeStart;
}
public Date getUpdateTimeEnd(){
return updateTimeEnd;
}
public void setUpdateTimeEnd(Date updateTimeEnd){
this.updateTimeEnd = updateTimeEnd;
}
public Integer getOperatorType(){
return operatorType;
}
public void setOperatorType(Integer operatorType){
this.operatorType = operatorType;
}
public String getOperatorId(){
return operatorId;
}
public void setOperatorId(String operatorId){
this.operatorId = operatorId;
}
/*Auto generated methods end*/
/*Customized methods start*/
/*Customized methods end*/
@Override
public String toString() {
return "DataDictCat ["
+ "dataDictCatCode = " + dataDictCatCode + ", dataDictCatName = " + dataDictCatName + ", parentCatCode = " + parentCatCode + ", memo = " + memo
+ ", isAvailable = " + isAvailable + ", isDeleted = " + isDeleted + ", createTime = " + createTime + ", createTimeStart = " + createTimeStart + ", createTimeEnd = " + createTimeEnd + ", updateTime = " + updateTime + ", updateTimeStart = " + updateTimeStart + ", updateTimeEnd = " + updateTimeEnd
+ ", operatorType = " + operatorType + ", operatorId = " + operatorId
+"]";
}
}
package cn.com.fqy.core.model;
import java.util.Date;
import cn.com.fqy.common.Entity;
/**
* 数据字典的明细项表 数据实体类
*/
public class DataDictItem extends Entity<String> {
private static final long serialVersionUID = 1l;
/*Auto generated properties start*/
//数据字典项id
private String dataDictItemId;
//数据字典分类编码(如,城市:CITY)
private String dataDictCatCode;
//父级项的id
private String parentItemId;
//字典项的值
private String itemValue;
//备注
private String memo;
//是否可用(1、可用,0、不可用,默认1)
private Integer isAvailable;
//可用状态更新时间
private Date availableUpdateTime;
//可用状态更新时间 时间范围起(查询用)
private Date availableUpdateTimeStart;
//可用状态更新时间 时间范围止(查询用)
private Date availableUpdateTimeEnd;
//是否已删除(1、已删除,0、未删除,默认0)
private Integer isDeleted;
//创建时间
private Date createTime;
//创建时间 时间范围起(查询用)
private Date createTimeStart;
//创建时间 时间范围止(查询用)
private Date createTimeEnd;
//更新时间
private Date updateTime;
//更新时间 时间范围起(查询用)
private Date updateTimeStart;
//更新时间 时间范围止(查询用)
private Date updateTimeEnd;
//操作人id
private String operatorId;
//操作人类型(0、系统自动操作,1、平台人员操作,2、商家人员操作,3、会员操作)
private Integer operatorType;
/*Auto generated properties end*/
/*Customized properties start*/
/*Customized properties end*/
/*Auto generated methods start*/
@Override
public String getPK(){
return dataDictItemId;
}
public String getDataDictItemId(){
return dataDictItemId;
}
public void setDataDictItemId(String dataDictItemId){
this.dataDictItemId = dataDictItemId;
}
public String getDataDictCatCode(){
return dataDictCatCode;
}
public void setDataDictCatCode(String dataDictCatCode){
this.dataDictCatCode = dataDictCatCode;
}
public String getParentItemId(){
return parentItemId;
}
public void setParentItemId(String parentItemId){
this.parentItemId = parentItemId;
}
public String getItemValue(){
return itemValue;
}
public void setItemValue(String itemValue){
this.itemValue = itemValue;
}
public String getMemo(){
return memo;
}
public void setMemo(String memo){
this.memo = memo;
}
public Integer getIsAvailable(){
return isAvailable;
}
public void setIsAvailable(Integer isAvailable){
this.isAvailable = isAvailable;
}
public Date getAvailableUpdateTime(){
return availableUpdateTime;
}
public void setAvailableUpdateTime(Date availableUpdateTime){
this.availableUpdateTime = availableUpdateTime;
}
public Date getAvailableUpdateTimeStart(){
return availableUpdateTimeStart;
}
public void setAvailableUpdateTimeStart(Date availableUpdateTimeStart){
this.availableUpdateTimeStart = availableUpdateTimeStart;
}
public Date getAvailableUpdateTimeEnd(){
return availableUpdateTimeEnd;
}
public void setAvailableUpdateTimeEnd(Date availableUpdateTimeEnd){
this.availableUpdateTimeEnd = availableUpdateTimeEnd;
}
public Integer getIsDeleted(){
return isDeleted;
}
public void setIsDeleted(Integer isDeleted){
this.isDeleted = isDeleted;
}
public Date getCreateTime(){
return createTime;
}
public void setCreateTime(Date createTime){
this.createTime = createTime;
}
public Date getCreateTimeStart(){
return createTimeStart;
}
public void setCreateTimeStart(Date createTimeStart){
this.createTimeStart = createTimeStart;
}
public Date getCreateTimeEnd(){
return createTimeEnd;
}
public void setCreateTimeEnd(Date createTimeEnd){
this.createTimeEnd = createTimeEnd;
}
public Date getUpdateTime(){
return updateTime;
}
public void setUpdateTime(Date updateTime){
this.updateTime = updateTime;
}
public Date getUpdateTimeStart(){
return updateTimeStart;
}
public void setUpdateTimeStart(Date updateTimeStart){
this.updateTimeStart = updateTimeStart;
}
public Date getUpdateTimeEnd(){
return updateTimeEnd;
}
public void setUpdateTimeEnd(Date updateTimeEnd){
this.updateTimeEnd = updateTimeEnd;
}
public String getOperatorId(){
return operatorId;
}
public void setOperatorId(String operatorId){
this.operatorId = operatorId;
}
public Integer getOperatorType(){
return operatorType;
}
public void setOperatorType(Integer operatorType){
this.operatorType = operatorType;
}
/*Auto generated methods end*/
/*Customized methods start*/
/*Customized methods end*/
@Override
public String toString() {
return "DataDictItem ["
+ "dataDictItemId = " + dataDictItemId + ", dataDictCatCode = " + dataDictCatCode + ", parentItemId = " + parentItemId + ", itemValue = " + itemValue
+ ", memo = " + memo + ", isAvailable = " + isAvailable + ", availableUpdateTime = " + availableUpdateTime + ", availableUpdateTimeStart = " + availableUpdateTimeStart + ", availableUpdateTimeEnd = " + availableUpdateTimeEnd + ", isDeleted = " + isDeleted
+ ", createTime = " + createTime + ", createTimeStart = " + createTimeStart + ", createTimeEnd = " + createTimeEnd + ", updateTime = " + updateTime + ", updateTimeStart = " + updateTimeStart + ", updateTimeEnd = " + updateTimeEnd + ", operatorId = " + operatorId + ", operatorType = " + operatorType
+"]";
}
}
...@@ -28,7 +28,7 @@ public class Store extends Entity<String> { ...@@ -28,7 +28,7 @@ public class Store extends Entity<String> {
//省份 //省份
private String province; private String province;
//祖籍 //祖籍
private String ancestral; private String administratorsId;
//区县 //区县
private String county; private String county;
//位置 //位置
...@@ -89,6 +89,8 @@ public class Store extends Entity<String> { ...@@ -89,6 +89,8 @@ public class Store extends Entity<String> {
private Integer isDeleted; private Integer isDeleted;
//是否启用(0不启用1 启用) //是否启用(0不启用1 启用)
private Integer isAvailable; private Integer isAvailable;
//店铺管理员名称
private String administratorsName;
/*Auto generated properties end*/ /*Auto generated properties end*/
...@@ -101,6 +103,14 @@ public class Store extends Entity<String> { ...@@ -101,6 +103,14 @@ public class Store extends Entity<String> {
/*Auto generated methods start*/ /*Auto generated methods start*/
public String getAdministratorsName() {
return administratorsName;
}
public void setAdministratorsName(String administratorsName) {
this.administratorsName = administratorsName;
}
public Integer getIsDeleted() { public Integer getIsDeleted() {
return isDeleted; return isDeleted;
} }
...@@ -178,12 +188,12 @@ public class Store extends Entity<String> { ...@@ -178,12 +188,12 @@ public class Store extends Entity<String> {
this.province = province; this.province = province;
} }
public String getAncestral(){ public String getAdministratorsId(){
return ancestral; return administratorsId;
} }
public void setAncestral(String ancestral){ public void setAdministratorsId(String administratorsId){
this.ancestral = ancestral; this.administratorsId = administratorsId;
} }
public String getCounty(){ public String getCounty(){
...@@ -424,7 +434,7 @@ public class Store extends Entity<String> { ...@@ -424,7 +434,7 @@ public class Store extends Entity<String> {
public String toString() { public String toString() {
return "Store [storeId=" + storeId + ", storeName=" + storeName + ", contactNumber=" + contactNumber return "Store [storeId=" + storeId + ", storeName=" + storeName + ", contactNumber=" + contactNumber
+ ", contacts=" + contacts + ", qq=" + qq + ", wechat=" + wechat + ", province=" + province + ", contacts=" + contacts + ", qq=" + qq + ", wechat=" + wechat + ", province=" + province
+ ", ancestral=" + ancestral + ", county=" + county + ", storePosition=" + storePosition + ", administratorsId=" + administratorsId + ", county=" + county + ", storePosition=" + storePosition
+ ", storeBusinessTimeStart=" + storeBusinessTimeStart + ", storeBusinessTimeEnd=" + ", storeBusinessTimeStart=" + storeBusinessTimeStart + ", storeBusinessTimeEnd="
+ storeBusinessTimeEnd + ", consumeInterval=" + consumeInterval + ", storeDetails=" + storeDetails + storeBusinessTimeEnd + ", consumeInterval=" + consumeInterval + ", storeDetails=" + storeDetails
+ ", qrCode=" + qrCode + ", storeHomePic=" + storeHomePic + ", storePic=" + storePic + ", isAuditing=" + ", qrCode=" + qrCode + ", storeHomePic=" + storeHomePic + ", storePic=" + storePic + ", isAuditing="
...@@ -435,6 +445,6 @@ public class Store extends Entity<String> { ...@@ -435,6 +445,6 @@ public class Store extends Entity<String> {
+ ", createTimeEnd=" + createTimeEnd + ", updateTime=" + updateTime + ", updateTimeStart=" + ", createTimeEnd=" + createTimeEnd + ", updateTime=" + updateTime + ", updateTimeStart="
+ updateTimeStart + ", updateTimeEnd=" + updateTimeEnd + ", operatorId=" + operatorId + updateTimeStart + ", updateTimeEnd=" + updateTimeEnd + ", operatorId=" + operatorId
+ ", operatorType=" + operatorType + ", serialNumber=" + serialNumber + ", isDeleted=" + isDeleted + ", operatorType=" + operatorType + ", serialNumber=" + serialNumber + ", isDeleted=" + isDeleted
+ ", isAvailable=" + isAvailable + "]"; + ", isAvailable=" + isAvailable + ", administratorsName=" + administratorsName + "]";
} }
} }
...@@ -45,6 +45,8 @@ public class SysUserRoleIds extends Entity<String> { ...@@ -45,6 +45,8 @@ public class SysUserRoleIds extends Entity<String> {
private Integer operatorType; private Integer operatorType;
//操作人id(根据操作人类型会对应不同的表记录) //操作人id(根据操作人类型会对应不同的表记录)
private String operatorId; private String operatorId;
//店铺管理员编号
private String administratorsId;
private String[] sysRole; private String[] sysRole;
...@@ -57,6 +59,16 @@ public class SysUserRoleIds extends Entity<String> { ...@@ -57,6 +59,16 @@ public class SysUserRoleIds extends Entity<String> {
return userId; return userId;
} }
public String getAdministratorsId() {
return administratorsId;
}
public void setAdministratorsId(String administratorsId) {
this.administratorsId = administratorsId;
}
public void setUserId(String userId){ public void setUserId(String userId){
this.userId = userId; this.userId = userId;
} }
......
package cn.com.fqy.core.service;
import java.util.List;
import cn.com.fqy.common.Operator;
import cn.com.fqy.common.ResultInfo;
import cn.com.fqy.core.common.BaseService;
import cn.com.fqy.core.common.PageFinder;
import cn.com.fqy.core.model.DataDictCat;
import cn.com.fqy.core.model.Query;
/**
* 数据字典的分类表 服务接口类
*/
public interface DataDictCatService extends BaseService {
/**
* 根据查询条件,查询并返回DataDictCat的列表
* @param q 查询条件
* @return
*/
public List<DataDictCat> getDataDictCatList(Query q);
/**
* 根据查询条件,分页查询并返回DataDictCat的分页结果
* @param q 查询条件
* @return
*/
public PageFinder<DataDictCat> getDataDictCatPagedList(Query q);
/**
* 根据主键,查询并返回一个DataDictCat对象
* @param id 主键id
* @return
*/
public DataDictCat getDataDictCat(String id);
/**
* 根据主键数组,查询并返回一组DataDictCat对象
* @param ids 主键数组,数组中的主键值应当无重复值,如有重复值时,则返回的列表长度可能小于传入的数组长度
* @return
*/
public List<DataDictCat> getDataDictCatByIds(String[] ids);
/**
* 根据主键,删除特定的DataDictCat记录
* @param id 主键id
* @param operator 操作人对象
* @return
*/
public ResultInfo<DataDictCat> delDataDictCat(String id, Operator operator);
/**
* 新增一条DataDictCat记录,执行成功后传入对象及返回对象的主键属性值不为null
* @param dataDictCat 新增的DataDictCat数据(如果无特殊需求,新增对象的主键值请保留为null)
* @param operator 操作人对象
* @return
*/
public ResultInfo<DataDictCat> addDataDictCat(DataDictCat dataDictCat, Operator operator);
/**
* 根据主键,更新一条DataDictCat记录
* @param dataDictCat 更新的DataDictCat数据,且其主键不能为空
* @param operator 操作人对象
* @return
*/
public ResultInfo<DataDictCat> updateDataDictCat(DataDictCat dataDictCat, Operator operator);
/**
* 生成主键
* @return
*/
public String generatePK();
/**
* 为DataDictCat对象设置默认值
* @param obj
*/
public void fillDefaultValues(DataDictCat obj);
}
package cn.com.fqy.core.service;
import java.util.List;
import cn.com.fqy.common.Operator;
import cn.com.fqy.common.ResultInfo;
import cn.com.fqy.core.common.BaseService;
import cn.com.fqy.core.common.PageFinder;
import cn.com.fqy.core.model.DataDictItem;
import cn.com.fqy.core.model.Query;
/**
* 数据字典的明细项表 服务接口类
*/
public interface DataDictItemService extends BaseService {
/**
* 根据查询条件,查询并返回DataDictItem的列表
* @param q 查询条件
* @return
*/
public List<DataDictItem> getDataDictItemList(Query q);
/**
* 根据查询条件,分页查询并返回DataDictItem的分页结果
* @param q 查询条件
* @return
*/
public PageFinder<DataDictItem> getDataDictItemPagedList(Query q);
/**
* 根据主键,查询并返回一个DataDictItem对象
* @param id 主键id
* @return
*/
public DataDictItem getDataDictItem(String id);
/**
* 根据字典分类编码,取得该分类下所有可用的数据字典项,以list形式返回
* @param catCode
* @return
*/
public List<DataDictItem> getDataDictItemListByCatCode(String catCode);
/**
* 根据主键数组,查询并返回一组DataDictItem对象
* @param ids 主键数组,数组中的主键值应当无重复值,如有重复值时,则返回的列表长度可能小于传入的数组长度
* @return
*/
public List<DataDictItem> getDataDictItemByIds(String[] ids);
/**
* 根据主键,删除特定的DataDictItem记录
* @param id 主键id
* @param operator 操作人对象
* @return
*/
public ResultInfo<DataDictItem> delDataDictItem(String id, Operator operator);
/**
* 新增一条DataDictItem记录,执行成功后传入对象及返回对象的主键属性值不为null
* @param dataDictItem 新增的DataDictItem数据(如果无特殊需求,新增对象的主键值请保留为null)
* @param operator 操作人对象
* @return
*/
public ResultInfo<DataDictItem> addDataDictItem(DataDictItem dataDictItem, Operator operator);
/**
* 根据主键,更新一条DataDictItem记录
* @param dataDictItem 更新的DataDictItem数据,且其主键不能为空
* @param operator 操作人对象
* @return
*/
public ResultInfo<DataDictItem> updateDataDictItem(DataDictItem dataDictItem, Operator operator);
/**
* 生成主键
* @return
*/
public String generatePK();
/**
* 为DataDictItem对象设置默认值
* @param obj
*/
public void fillDefaultValues(DataDictItem obj);
public List<DataDictItem> getDataDictCatCode();
}
<?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.fqy.core.dao.DataDictCatDao">
<resultMap type="DataDictCat" id="DataDictCat">
<id column="DATA_DICT_CAT_CODE" property="dataDictCatCode" javaType="java.lang.String" jdbcType="VARCHAR"/>
<result column="DATA_DICT_CAT_NAME" property="dataDictCatName" javaType="java.lang.String" jdbcType="VARCHAR"/>
<result column="PARENT_CAT_CODE" property="parentCatCode" javaType="java.lang.String" jdbcType="VARCHAR"/>
<result column="MEMO" property="memo" javaType="java.lang.String" jdbcType="VARCHAR"/>
<result column="IS_AVAILABLE" property="isAvailable" javaType="java.lang.Integer" jdbcType="TINYINT"/>
<result column="IS_DELETED" property="isDeleted" javaType="java.lang.Integer" jdbcType="TINYINT"/>
<result column="CREATE_TIME" property="createTime" javaType="java.util.Date" jdbcType="TIMESTAMP"/>
<result column="UPDATE_TIME" property="updateTime" javaType="java.util.Date" jdbcType="TIMESTAMP"/>
<result column="OPERATOR_TYPE" property="operatorType" javaType="java.lang.Integer" jdbcType="TINYINT"/>
<result column="OPERATOR_ID" property="operatorId" javaType="java.lang.String" jdbcType="VARCHAR"/>
</resultMap>
<!-- 全部字段,一般用于明细查询 -->
<sql id="AllColumnlist">
DATA_DICT_CAT_CODE,DATA_DICT_CAT_NAME,PARENT_CAT_CODE,MEMO,IS_AVAILABLE,IS_DELETED,CREATE_TIME,
UPDATE_TIME,OPERATOR_TYPE,OPERATOR_ID
</sql>
<!-- 常见字段,一般用于列表查询,可能不包含备注之类的字段 -->
<sql id="CommonColumnlist">
DATA_DICT_CAT_CODE,DATA_DICT_CAT_NAME,PARENT_CAT_CODE,MEMO,IS_AVAILABLE,IS_DELETED,CREATE_TIME,
UPDATE_TIME,OPERATOR_TYPE,OPERATOR_ID
</sql>
<insert id="add" parameterType="DataDictCat" useGeneratedKeys="true" keyProperty="dataDictCatCode">
insert into T_DATA_DICT_CAT(
<if test="dataDictCatCode!=null">
DATA_DICT_CAT_CODE,
</if>
DATA_DICT_CAT_NAME,
PARENT_CAT_CODE,
MEMO,
IS_AVAILABLE,
IS_DELETED,
CREATE_TIME,
UPDATE_TIME,
OPERATOR_TYPE,
OPERATOR_ID
) values (
<if test="dataDictCatCode!=null">
#{dataDictCatCode,jdbcType = VARCHAR},
</if>
#{dataDictCatName,jdbcType = VARCHAR},
#{parentCatCode,jdbcType = VARCHAR},
#{memo,jdbcType = VARCHAR},
#{isAvailable,jdbcType = TINYINT},
#{isDeleted,jdbcType = TINYINT},
#{createTime,jdbcType = TIMESTAMP},
#{updateTime,jdbcType = TIMESTAMP},
#{operatorType,jdbcType = TINYINT},
#{operatorId,jdbcType = VARCHAR}
)
</insert>
<update id="update" parameterType="DataDictCat">
update T_DATA_DICT_CAT
<set>
<if test="dataDictCatName!=null and dataDictCatName!=''">
DATA_DICT_CAT_NAME=#{dataDictCatName,jdbcType = VARCHAR},
</if>
<if test="parentCatCode!=null">
PARENT_CAT_CODE=#{parentCatCode,jdbcType = VARCHAR},
</if>
<if test="memo!=null and memo!=''">
MEMO=#{memo,jdbcType = VARCHAR},
</if>
<if test="isAvailable!=null ">
IS_AVAILABLE=#{isAvailable,jdbcType = TINYINT},
</if>
<if test="isDeleted!=null ">
IS_DELETED=#{isDeleted,jdbcType = TINYINT},
</if>
<if test="createTime!=null ">
CREATE_TIME=#{createTime,jdbcType = TIMESTAMP},
</if>
<if test="updateTime!=null ">
UPDATE_TIME=#{updateTime,jdbcType = TIMESTAMP},
</if>
<if test="operatorType!=null ">
OPERATOR_TYPE=#{operatorType,jdbcType = TINYINT},
</if>
<if test="operatorId!=null and operatorId!=''">
OPERATOR_ID=#{operatorId,jdbcType = VARCHAR},
</if>
</set>
<where>
AND DATA_DICT_CAT_CODE=#{dataDictCatCode}
</where>
</update>
<delete id="delete">
delete from T_DATA_DICT_CAT
<where>
DATA_DICT_CAT_CODE=#{0}
</where>
</delete>
<select id="get" resultMap="DataDictCat">
select <include refid="AllColumnlist"/> from T_DATA_DICT_CAT
<where>
DATA_DICT_CAT_CODE=#{0}
</where>
</select>
<select id="getByIds" resultMap="DataDictCat">
select <include refid="AllColumnlist"/> from T_DATA_DICT_CAT
<where>
DATA_DICT_CAT_CODE in <foreach item="item" index="index" collection="array" open="(" separator="," close=")">#{item}</foreach>
</where>
</select>
<select id="count" parameterType="Query" resultType="Long">
select count(DATA_DICT_CAT_CODE) from T_DATA_DICT_CAT
<where>
<include refid="listCommonWhere"/>
</where>
</select>
<select id="queryAll" parameterType="Query" resultMap="DataDictCat">
select <include refid="CommonColumnlist"/> from T_DATA_DICT_CAT
<where>
<include refid="listCommonWhere"/>
</where>
</select>
<select id="pageList" parameterType="Query" resultMap="DataDictCat">
select <include refid="CommonColumnlist"/> from T_DATA_DICT_CAT
<where>
<include refid="listCommonWhere"/>
</where>
<![CDATA[LIMIT #{rowIndex},#{pageSize} ]]>
</select>
<sql id="listCommonWhere">
<if test="q==null"><!-- 无传入参数时默认查未删除的 -->
AND IS_DELETED=0
</if>
<if test="q!=null">
<if test="q.dataDictCatCode!=null and q.dataDictCatCode!=''">
AND DATA_DICT_CAT_CODE like '%${q.dataDictCatCode}%'
</if>
<if test="q.dataDictCatName!=null and q.dataDictCatName!=''">
AND DATA_DICT_CAT_NAME like '%${q.dataDictCatName}%'
</if>
<if test="q.parentCatCode!=null and q.parentCatCode!=''">
AND PARENT_CAT_CODE=#{q.parentCatCode}
</if>
<if test="q.memo!=null and q.memo!=''">
AND MEMO=#{q.memo}
</if>
<if test="q.isAvailable!=null ">
AND IS_AVAILABLE=#{q.isAvailable}
</if>
<if test="q.isDeleted!=null ">
AND IS_DELETED=#{q.isDeleted}
</if>
<if test="q.createTime!=null ">
AND CREATE_TIME=#{q.createTime}
</if>
<if test="q.createTimeStart!=null">
<![CDATA[ AND CREATE_TIME>=#{q.createTimeStart} ]]>
</if>
<if test="q.createTimeEnd!=null">
<![CDATA[ AND CREATE_TIME<#{q.createTimeEnd} ]]>
</if>
<if test="q.updateTime!=null ">
AND UPDATE_TIME=#{q.updateTime}
</if>
<if test="q.updateTimeStart!=null">
<![CDATA[ AND UPDATE_TIME>=#{q.updateTimeStart} ]]>
</if>
<if test="q.updateTimeEnd!=null">
<![CDATA[ AND UPDATE_TIME<#{q.updateTimeEnd} ]]>
</if>
<if test="q.operatorType!=null ">
AND OPERATOR_TYPE=#{q.operatorType}
</if>
<if test="q.operatorId!=null and q.operatorId!=''">
AND OPERATOR_ID=#{q.operatorId}
</if>
</if>
</sql>
</mapper>
\ No newline at end of file
<?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.fqy.core.dao.DataDictItemDao">
<resultMap type="DataDictItem" id="DataDictItem">
<id column="DATA_DICT_ITEM_ID" property="dataDictItemId" javaType="java.lang.String" jdbcType="VARCHAR"/>
<result column="DATA_DICT_CAT_CODE" property="dataDictCatCode" javaType="java.lang.String" jdbcType="VARCHAR"/>
<result column="PARENT_ITEM_ID" property="parentItemId" javaType="java.lang.String" jdbcType="VARCHAR"/>
<result column="ITEM_VALUE" property="itemValue" javaType="java.lang.String" jdbcType="VARCHAR"/>
<result column="MEMO" property="memo" javaType="java.lang.String" jdbcType="VARCHAR"/>
<result column="IS_AVAILABLE" property="isAvailable" javaType="java.lang.Integer" jdbcType="TINYINT"/>
<result column="AVAILABLE_UPDATE_TIME" property="availableUpdateTime" javaType="java.util.Date" jdbcType="TIMESTAMP"/>
<result column="IS_DELETED" property="isDeleted" javaType="java.lang.Integer" jdbcType="TINYINT"/>
<result column="CREATE_TIME" property="createTime" javaType="java.util.Date" jdbcType="TIMESTAMP"/>
<result column="UPDATE_TIME" property="updateTime" javaType="java.util.Date" jdbcType="TIMESTAMP"/>
<result column="OPERATOR_ID" property="operatorId" javaType="java.lang.String" jdbcType="VARCHAR"/>
<result column="OPERATOR_TYPE" property="operatorType" javaType="java.lang.Integer" jdbcType="TINYINT"/>
</resultMap>
<!-- 全部字段,一般用于明细查询 -->
<sql id="AllColumnlist">
DATA_DICT_ITEM_ID,DATA_DICT_CAT_CODE,PARENT_ITEM_ID,ITEM_VALUE,MEMO,IS_AVAILABLE,AVAILABLE_UPDATE_TIME,
IS_DELETED,CREATE_TIME,UPDATE_TIME,OPERATOR_ID,OPERATOR_TYPE
</sql>
<!-- 常见字段,一般用于列表查询,可能不包含备注之类的字段 -->
<sql id="CommonColumnlist">
DATA_DICT_ITEM_ID,DATA_DICT_CAT_CODE,PARENT_ITEM_ID,ITEM_VALUE,MEMO,IS_AVAILABLE,AVAILABLE_UPDATE_TIME,
IS_DELETED,CREATE_TIME,UPDATE_TIME,OPERATOR_ID,OPERATOR_TYPE
</sql>
<insert id="add" parameterType="DataDictItem" useGeneratedKeys="true" keyProperty="dataDictItemId">
insert into T_DATA_DICT_ITEM(
<if test="dataDictItemId!=null">
DATA_DICT_ITEM_ID,
</if>
DATA_DICT_CAT_CODE,
PARENT_ITEM_ID,
ITEM_VALUE,
MEMO,
IS_AVAILABLE,
AVAILABLE_UPDATE_TIME,
IS_DELETED,
CREATE_TIME,
UPDATE_TIME,
OPERATOR_ID,
OPERATOR_TYPE
) values (
<if test="dataDictItemId!=null">
#{dataDictItemId,jdbcType = VARCHAR},
</if>
#{dataDictCatCode,jdbcType = VARCHAR},
#{parentItemId,jdbcType = VARCHAR},
#{itemValue,jdbcType = VARCHAR},
#{memo,jdbcType = VARCHAR},
#{isAvailable,jdbcType = TINYINT},
#{availableUpdateTime,jdbcType = TIMESTAMP},
#{isDeleted,jdbcType = TINYINT},
#{createTime,jdbcType = TIMESTAMP},
#{updateTime,jdbcType = TIMESTAMP},
#{operatorId,jdbcType = VARCHAR},
#{operatorType,jdbcType = TINYINT}
)
</insert>
<update id="update" parameterType="DataDictItem">
update T_DATA_DICT_ITEM
<set>
<if test="dataDictCatCode!=null and dataDictCatCode!=''">
DATA_DICT_CAT_CODE=#{dataDictCatCode,jdbcType = VARCHAR},
</if>
<if test="parentItemId!=null and parentItemId!=''">
PARENT_ITEM_ID=#{parentItemId,jdbcType = VARCHAR},
</if>
<if test="itemValue!=null and itemValue!=''">
ITEM_VALUE=#{itemValue,jdbcType = VARCHAR},
</if>
<if test="memo!=null and memo!=''">
MEMO=#{memo,jdbcType = VARCHAR},
</if>
<if test="isAvailable!=null ">
IS_AVAILABLE=#{isAvailable,jdbcType = TINYINT},
</if>
<if test="availableUpdateTime!=null ">
AVAILABLE_UPDATE_TIME=#{availableUpdateTime,jdbcType = TIMESTAMP},
</if>
<if test="isDeleted!=null ">
IS_DELETED=#{isDeleted,jdbcType = TINYINT},
</if>
<if test="createTime!=null ">
CREATE_TIME=#{createTime,jdbcType = TIMESTAMP},
</if>
<if test="updateTime!=null ">
UPDATE_TIME=#{updateTime,jdbcType = TIMESTAMP},
</if>
<if test="operatorId!=null and operatorId!=''">
OPERATOR_ID=#{operatorId,jdbcType = VARCHAR},
</if>
<if test="operatorType!=null ">
OPERATOR_TYPE=#{operatorType,jdbcType = TINYINT},
</if>
</set>
<where>
AND DATA_DICT_ITEM_ID=#{dataDictItemId}
</where>
</update>
<delete id="delete">
delete from T_DATA_DICT_ITEM
<where>
DATA_DICT_ITEM_ID=#{0}
</where>
</delete>
<select id="get" resultMap="DataDictItem">
select <include refid="AllColumnlist"/> from T_DATA_DICT_ITEM
<where>
DATA_DICT_ITEM_ID=#{0}
</where>
</select>
<select id="getDataDictCatCode" resultMap="DataDictItem">
select DATA_DICT_ITEM_ID,DATA_DICT_CAT_CODE from T_DATA_DICT_ITEM group by DATA_DICT_CAT_CODE
</select>
<select id="getByIds" resultMap="DataDictItem">
select <include refid="AllColumnlist"/> from T_DATA_DICT_ITEM
<where>
DATA_DICT_ITEM_ID in <foreach item="item" index="index" collection="array" open="(" separator="," close=")">#{item}</foreach>
</where>
</select>
<select id="count" parameterType="Query" resultType="Long">
select count(DATA_DICT_ITEM_ID) from T_DATA_DICT_ITEM
<where>
<include refid="listCommonWhere"/>
</where>
</select>
<select id="queryAll" parameterType="Query" resultMap="DataDictItem">
select <include refid="CommonColumnlist"/> from T_DATA_DICT_ITEM
<where>
<include refid="listCommonWhere"/>
</where>
</select>
<select id="pageList" parameterType="Query" resultMap="DataDictItem">
select <include refid="CommonColumnlist"/> from T_DATA_DICT_ITEM
<where>
<include refid="listCommonWhere"/>
</where>
<![CDATA[LIMIT #{rowIndex},#{pageSize} ]]>
</select>
<sql id="listCommonWhere">
<if test="q==null"><!-- 无传入参数时默认查未删除的 -->
AND IS_DELETED=0
</if>
<if test="q!=null">
<if test="q.dataDictItemId!=null and q.dataDictItemId!=''">
AND DATA_DICT_ITEM_ID=#{q.dataDictItemId}
</if>
<if test="q.dataDictCatCode!=null and q.dataDictCatCode!=''">
AND DATA_DICT_CAT_CODE like '%${q.dataDictCatCode}%'
</if>
<if test="q.parentItemId!=null and q.parentItemId!=''">
AND PARENT_ITEM_ID=#{q.parentItemId}
</if>
<if test="q.itemValue!=null and q.itemValue!=''">
AND ITEM_VALUE like '%${q.itemValue}%'
</if>
<if test="q.memo!=null and q.memo!=''">
AND MEMO=#{q.memo}
</if>
<if test="q.isAvailable!=null ">
AND IS_AVAILABLE=#{q.isAvailable}
</if>
<if test="q.availableUpdateTime!=null ">
AND AVAILABLE_UPDATE_TIME=#{q.availableUpdateTime}
</if>
<if test="q.availableUpdateTimeStart!=null">
<![CDATA[ AND AVAILABLE_UPDATE_TIME>=#{q.availableUpdateTimeStart} ]]>
</if>
<if test="q.availableUpdateTimeEnd!=null">
<![CDATA[ AND AVAILABLE_UPDATE_TIME<#{q.availableUpdateTimeEnd} ]]>
</if>
<if test="q.isDeleted!=null ">
AND IS_DELETED=#{q.isDeleted}
</if>
<if test="q.createTime!=null ">
AND CREATE_TIME=#{q.createTime}
</if>
<if test="q.createTimeStart!=null">
<![CDATA[ AND CREATE_TIME>=#{q.createTimeStart} ]]>
</if>
<if test="q.createTimeEnd!=null">
<![CDATA[ AND CREATE_TIME<#{q.createTimeEnd} ]]>
</if>
<if test="q.updateTime!=null ">
AND UPDATE_TIME=#{q.updateTime}
</if>
<if test="q.updateTimeStart!=null">
<![CDATA[ AND UPDATE_TIME>=#{q.updateTimeStart} ]]>
</if>
<if test="q.updateTimeEnd!=null">
<![CDATA[ AND UPDATE_TIME<#{q.updateTimeEnd} ]]>
</if>
<if test="q.operatorId!=null and q.operatorId!=''">
AND OPERATOR_ID=#{q.operatorId}
</if>
<if test="q.operatorType!=null ">
AND OPERATOR_TYPE=#{q.operatorType}
</if>
</if>
</sql>
</mapper>
\ No newline at end of file
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<result column="QQ" property="qq" javaType="java.lang.String" jdbcType="VARCHAR"/> <result column="QQ" property="qq" javaType="java.lang.String" jdbcType="VARCHAR"/>
<result column="WECHAT" property="wechat" javaType="java.lang.String" jdbcType="VARCHAR"/> <result column="WECHAT" property="wechat" javaType="java.lang.String" jdbcType="VARCHAR"/>
<result column="PROVINCE" property="province" javaType="java.lang.String" jdbcType="VARCHAR"/> <result column="PROVINCE" property="province" javaType="java.lang.String" jdbcType="VARCHAR"/>
<result column="ANCESTRAL" property="ancestral" javaType="java.lang.String" jdbcType="VARCHAR"/> <result column="ADMINISTRATORS_ID" property="administratorsId" javaType="java.lang.String" jdbcType="VARCHAR"/>
<result column="COUNTY" property="county" javaType="java.lang.String" jdbcType="VARCHAR"/> <result column="COUNTY" property="county" javaType="java.lang.String" jdbcType="VARCHAR"/>
<result column="STORE_POSITION" property="storePosition" javaType="java.lang.String" jdbcType="VARCHAR"/> <result column="STORE_POSITION" property="storePosition" javaType="java.lang.String" jdbcType="VARCHAR"/>
<result column="STORE_BUSINESS_TIME_START" property="storeBusinessTimeStart" javaType="java.lang.String" jdbcType="VARCHAR"/> <result column="STORE_BUSINESS_TIME_START" property="storeBusinessTimeStart" javaType="java.lang.String" jdbcType="VARCHAR"/>
...@@ -33,25 +33,26 @@ ...@@ -33,25 +33,26 @@
<result column="SERIAL_NUMBER" property="serialNumber" javaType="java.lang.Integer" jdbcType="INTEGER"/> <result column="SERIAL_NUMBER" property="serialNumber" javaType="java.lang.Integer" jdbcType="INTEGER"/>
<result column="IS_DELETED" property="isDeleted" javaType="java.lang.Integer" jdbcType="TINYINT"/> <result column="IS_DELETED" property="isDeleted" javaType="java.lang.Integer" jdbcType="TINYINT"/>
<result column="IS_AVAILABLE" property="isAvailable" javaType="java.lang.Integer" jdbcType="TINYINT"/> <result column="IS_AVAILABLE" property="isAvailable" javaType="java.lang.Integer" jdbcType="TINYINT"/>
<result column="ADMINISTRATORS_NAME" property="administratorsName" javaType="java.lang.String" jdbcType="VARCHAR"/>
</resultMap> </resultMap>
<!-- 全部字段,一般用于明细查询 --> <!-- 全部字段,一般用于明细查询 -->
<sql id="AllColumnlist"> <sql id="AllColumnlist">
STORE_ID,STORE_NAME,CONTACT_NUMBER,CONTACTS,QQ,WECHAT,PROVINCE, STORE_ID,STORE_NAME,CONTACT_NUMBER,CONTACTS,QQ,WECHAT,PROVINCE,
ANCESTRAL,COUNTY,STORE_POSITION,STORE_BUSINESS_TIME_START,STORE_BUSINESS_TIME_END,CONSUME_INTERVAL, ADMINISTRATORS_ID,COUNTY,STORE_POSITION,STORE_BUSINESS_TIME_START,STORE_BUSINESS_TIME_END,CONSUME_INTERVAL,
STORE_DETAILS,QR_CODE,STORE_HOME_PIC,STORE_PIC,IS_AUDITING,IS_SHOPPING, STORE_DETAILS,QR_CODE,STORE_HOME_PIC,STORE_PIC,IS_AUDITING,IS_SHOPPING,
UPLOAD_TIME,MATURE_TIME,CLICKS,IS_RECOMMEND,CREATE_TIME,UPDATE_TIME, UPLOAD_TIME,MATURE_TIME,CLICKS,IS_RECOMMEND,CREATE_TIME,UPDATE_TIME,
OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,IS_AVAILABLE OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,IS_AVAILABLE,ADMINISTRATORS_NAME
</sql> </sql>
<!-- 常见字段,一般用于列表查询,可能不包含备注之类的字段 --> <!-- 常见字段,一般用于列表查询,可能不包含备注之类的字段 -->
<sql id="CommonColumnlist"> <sql id="CommonColumnlist">
STORE_ID,STORE_NAME,CONTACT_NUMBER,CONTACTS,QQ,WECHAT,PROVINCE, STORE_ID,STORE_NAME,CONTACT_NUMBER,CONTACTS,QQ,WECHAT,PROVINCE,
ANCESTRAL,COUNTY,STORE_POSITION,STORE_BUSINESS_TIME_START,STORE_BUSINESS_TIME_END,CONSUME_INTERVAL, ADMINISTRATORS_ID,COUNTY,STORE_POSITION,STORE_BUSINESS_TIME_START,STORE_BUSINESS_TIME_END,CONSUME_INTERVAL,
STORE_DETAILS,QR_CODE,STORE_HOME_PIC,STORE_PIC,IS_AUDITING,IS_SHOPPING, STORE_DETAILS,QR_CODE,STORE_HOME_PIC,STORE_PIC,IS_AUDITING,IS_SHOPPING,
UPLOAD_TIME,MATURE_TIME,CLICKS,IS_RECOMMEND,CREATE_TIME,UPDATE_TIME, UPLOAD_TIME,MATURE_TIME,CLICKS,IS_RECOMMEND,CREATE_TIME,UPDATE_TIME,
OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,IS_AVAILABLE OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,IS_AVAILABLE,ADMINISTRATORS_NAME
</sql> </sql>
<insert id="add" parameterType="Store" useGeneratedKeys="true" keyProperty="storeId"> <insert id="add" parameterType="Store" useGeneratedKeys="true" keyProperty="storeId">
...@@ -65,7 +66,7 @@ OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,IS_AVAILABLE ...@@ -65,7 +66,7 @@ OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,IS_AVAILABLE
QQ, QQ,
WECHAT, WECHAT,
PROVINCE, PROVINCE,
ANCESTRAL, ADMINISTRATORS_ID,
COUNTY, COUNTY,
STORE_POSITION, STORE_POSITION,
STORE_BUSINESS_TIME_START, STORE_BUSINESS_TIME_START,
...@@ -87,7 +88,8 @@ OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,IS_AVAILABLE ...@@ -87,7 +88,8 @@ OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,IS_AVAILABLE
OPERATOR_TYPE, OPERATOR_TYPE,
SERIAL_NUMBER, SERIAL_NUMBER,
IS_DELETED, IS_DELETED,
IS_AVAILABLE IS_AVAILABLE,
ADMINISTRATORS_NAME
) values ( ) values (
<if test="storeId!=null"> <if test="storeId!=null">
#{storeId,jdbcType = VARCHAR}, #{storeId,jdbcType = VARCHAR},
...@@ -98,7 +100,7 @@ OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,IS_AVAILABLE ...@@ -98,7 +100,7 @@ OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,IS_AVAILABLE
#{qq,jdbcType = VARCHAR}, #{qq,jdbcType = VARCHAR},
#{wechat,jdbcType = VARCHAR}, #{wechat,jdbcType = VARCHAR},
#{province,jdbcType = VARCHAR}, #{province,jdbcType = VARCHAR},
#{ancestral,jdbcType = VARCHAR}, #{administratorsId,jdbcType = VARCHAR},
#{county,jdbcType = VARCHAR}, #{county,jdbcType = VARCHAR},
#{storePosition,jdbcType = VARCHAR}, #{storePosition,jdbcType = VARCHAR},
#{storeBusinessTimeStart,jdbcType = VARCHAR}, #{storeBusinessTimeStart,jdbcType = VARCHAR},
...@@ -120,7 +122,8 @@ OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,IS_AVAILABLE ...@@ -120,7 +122,8 @@ OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,IS_AVAILABLE
#{operatorType,jdbcType = TINYINT}, #{operatorType,jdbcType = TINYINT},
#{serialNumber,jdbcType = INTEGER}, #{serialNumber,jdbcType = INTEGER},
#{isDeleted,jdbcType = TINYINT}, #{isDeleted,jdbcType = TINYINT},
#{isAvailable,jdbcType = TINYINT} #{isAvailable,jdbcType = TINYINT},
#{administratorsName,jdbcType = VARCHAR}
) )
</insert> </insert>
...@@ -145,8 +148,8 @@ OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,IS_AVAILABLE ...@@ -145,8 +148,8 @@ OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,IS_AVAILABLE
<if test="province!=null and province!=''"> <if test="province!=null and province!=''">
PROVINCE=#{province,jdbcType = VARCHAR}, PROVINCE=#{province,jdbcType = VARCHAR},
</if> </if>
<if test="ancestral!=null and ancestral!=''"> <if test="administratorsId!=null and administratorsId!=''">
ANCESTRAL=#{ancestral,jdbcType = VARCHAR}, ADMINISTRATORS_ID=#{administratorsId,jdbcType = VARCHAR},
</if> </if>
<if test="county!=null and county!=''"> <if test="county!=null and county!=''">
COUNTY=#{county,jdbcType = VARCHAR}, COUNTY=#{county,jdbcType = VARCHAR},
...@@ -214,6 +217,9 @@ OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,IS_AVAILABLE ...@@ -214,6 +217,9 @@ OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,IS_AVAILABLE
<if test="isAvailable!=null "> <if test="isAvailable!=null ">
IS_AVAILABLE=#{isAvailable,jdbcType = TINYINT}, IS_AVAILABLE=#{isAvailable,jdbcType = TINYINT},
</if> </if>
<if test="administratorsName!=null and administratorsName!=''">
ADMINISTRATORS_NAME=#{administratorsName,jdbcType = VARCHAR},
</if>
</set> </set>
<where> <where>
AND STORE_ID=#{storeId} AND STORE_ID=#{storeId}
...@@ -288,8 +294,8 @@ OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,IS_AVAILABLE ...@@ -288,8 +294,8 @@ OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,IS_AVAILABLE
<if test="q.province!=null and q.province!=''"> <if test="q.province!=null and q.province!=''">
AND PROVINCE=#{q.province} AND PROVINCE=#{q.province}
</if> </if>
<if test="q.ancestral!=null and q.ancestral!=''"> <if test="q.administratorsId!=null and q.administratorsId!=''">
AND ANCESTRAL=#{q.ancestral} AND ADMINISTRATORS_ID=#{q.administratorsId}
</if> </if>
<if test="q.county!=null and q.county!=''"> <if test="q.county!=null and q.county!=''">
AND COUNTY=#{q.county} AND COUNTY=#{q.county}
...@@ -381,6 +387,9 @@ OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,IS_AVAILABLE ...@@ -381,6 +387,9 @@ OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,IS_AVAILABLE
<if test="q.isAvailable!=null "> <if test="q.isAvailable!=null ">
AND IS_AVAILABLE=#{q.isAvailable} AND IS_AVAILABLE=#{q.isAvailable}
</if> </if>
<if test="q.administratorsName!=null and q.administratorsName!=''">
AND ADMINISTRATORS_NAME=#{q.administratorsName}
</if>
</if> </if>
</sql> </sql>
...@@ -410,8 +419,8 @@ OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,IS_AVAILABLE ...@@ -410,8 +419,8 @@ OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,IS_AVAILABLE
<if test="q.province!=null and q.province!=''"> <if test="q.province!=null and q.province!=''">
AND PROVINCE=#{q.province} AND PROVINCE=#{q.province}
</if> </if>
<if test="q.ancestral!=null and q.ancestral!=''"> <if test="q.administratorsId!=null and q.administratorsId!=''">
AND ANCESTRAL=#{q.ancestral} AND ADMINISTRATORS_ID=#{q.administratorsId}
</if> </if>
<if test="q.county!=null and q.county!=''"> <if test="q.county!=null and q.county!=''">
AND COUNTY LIKE '%${q.county}%' AND COUNTY LIKE '%${q.county}%'
...@@ -503,6 +512,9 @@ OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,IS_AVAILABLE ...@@ -503,6 +512,9 @@ OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,IS_AVAILABLE
<if test="q.isAvailable!=null "> <if test="q.isAvailable!=null ">
AND IS_AVAILABLE=#{q.isAvailable} AND IS_AVAILABLE=#{q.isAvailable}
</if> </if>
<if test="q.administratorsName!=null and q.administratorsName!=''">
AND ADMINISTRATORS_NAME=#{q.administratorsName}
</if>
</if> </if>
</sql> </sql>
</mapper> </mapper>
\ No newline at end of file
...@@ -12,7 +12,6 @@ const service = axios.create({ ...@@ -12,7 +12,6 @@ const service = axios.create({
console.log('请求地址:'+process.env.BASE_API); console.log('请求地址:'+process.env.BASE_API);
// request interceptor // request interceptor
service.interceptors.request.use(config => { service.interceptors.request.use(config => {
debugger
// Do something before request is sent // Do something before request is sent
const userInfro = getUserInfro() const userInfro = getUserInfro()
let param = config.data; let param = config.data;
......
...@@ -41,7 +41,7 @@ export function queryAllSysRole() { ...@@ -41,7 +41,7 @@ export function queryAllSysRole() {
// 选择管理员 // 选择管理员
export function queryAllShopAdmin() { export function queryAllShopAdmin() {
return request({ return request({
url: '/sysRole/queryAllSysRole', url: '/administrators/getAdministrators',
method: 'post', method: 'post',
}) })
} }
......
...@@ -118,15 +118,15 @@ ...@@ -118,15 +118,15 @@
<el-row :gutter="15"> <el-row :gutter="15">
<el-col :span="8" class="content-left"><label>店铺管理员</label></el-col> <el-col :span="8" class="content-left"><label>店铺管理员</label></el-col>
<el-col :span="16" class="content-right"> <el-col :span="16" class="content-right">
<el-select size="small" v-if="dialogType===1 || dialogType===2" placeholder="请选择店铺管理员" v-model="dialogBindData.deptId" @change="getSectionsByDeptId"> <el-select size="small" v-if="dialogType===1 || dialogType===2" placeholder="请选择店铺管理员" v-model="dialogBindData.administratorsId">
<el-option <el-option
v-for="item in shopAdminsData" v-for="item in shopAdminsData"
:key="item.deptId" :key="item.administratorsId"
:label="item.deptName" :label="item.administratorsName"
:value="item.deptId"> :value="item.administratorsId">
</el-option> </el-option>
</el-select> </el-select>
<span v-else>{{viewDeptName(dialogBindData.deptId)}}</span> <span v-else>{{dialogBindData.administratorsName}}</span>
</el-col> </el-col>
</el-row> </el-row>
...@@ -234,8 +234,8 @@ export default { ...@@ -234,8 +234,8 @@ export default {
sex: "", sex: "",
mobilePhone: "", mobilePhone: "",
isAvailable: 1, isAvailable: 1,
sysRole: "", administratorsName:"",
flag: "" administratorsId:""
}, },
//店铺管理员下拉数据 //店铺管理员下拉数据
...@@ -340,6 +340,7 @@ export default { ...@@ -340,6 +340,7 @@ export default {
}); });
}, },
edit(data) { edit(data) {
debugger
this.dialogType = 2; this.dialogType = 2;
this.getRoleList(() => { this.getRoleList(() => {
this.getSectionsByDeptId(data.deptId, () => { this.getSectionsByDeptId(data.deptId, () => {
...@@ -370,6 +371,8 @@ export default { ...@@ -370,6 +371,8 @@ export default {
} }
}, },
submmitFun() { submmitFun() {
console.log(this.dialogBindData)
let isSubmitActive; let isSubmitActive;
if (this.dialogType === 1) { if (this.dialogType === 1) {
// alert(`添加${JSON.stringify(this.dialogBindData)}`); // alert(`添加${JSON.stringify(this.dialogBindData)}`);
...@@ -379,8 +382,8 @@ export default { ...@@ -379,8 +382,8 @@ export default {
this.dialogBindData.realName && this.dialogBindData.realName &&
this.dialogBindData.mobilePhone && this.dialogBindData.mobilePhone &&
this.dialogBindData.sysRole && this.dialogBindData.sysRole &&
this.dialogBindData.deptId && this.dialogBindData.administratorsId;
this.dialogBindData.sectionId; // this.dialogBindData.administratorsName;
} else { } else {
// alert(`编辑${JSON.stringify(this.dialogBindData)}`); // alert(`编辑${JSON.stringify(this.dialogBindData)}`);
isSubmitActive = isSubmitActive =
...@@ -389,9 +392,8 @@ export default { ...@@ -389,9 +392,8 @@ export default {
this.dialogBindData.password && this.dialogBindData.password &&
this.dialogBindData.realName && this.dialogBindData.realName &&
this.dialogBindData.mobilePhone && this.dialogBindData.mobilePhone &&
this.dialogBindData.sysRole && this.dialogBindData.administratorsId;
this.dialogBindData.deptId && // this.dialogBindData.administratorsName;
this.dialogBindData.sectionId;
} }
// // 发送添加请求 // // 发送添加请求
if (isSubmitActive) { if (isSubmitActive) {
...@@ -494,11 +496,13 @@ export default { ...@@ -494,11 +496,13 @@ export default {
.all([ .all([
//方法一 //方法一
system.queryAllSysRole().then(res => { system.queryAllSysRole().then(res => {
debugger
this.chooseRole = res.data; this.chooseRole = res.data;
}), }),
//方法二 //方法二
system.queryAllShopAdmin().then(res => { system.queryAllShopAdmin().then(res => {
this.shopAdminsData = res.data; debugger
this.shopAdminsData = res.data.data;
}) })
]) ])
.then( .then(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment