Commit c86da07b authored by wangyihao's avatar wangyihao

修改 排序,新增接口

parent eb9406ce
package cn.com.fqy.controller.mgt;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Controller;
......@@ -12,6 +14,7 @@ import cn.com.fqy.core.common.BaseController;
import cn.com.fqy.core.common.PageFinder;
import cn.com.fqy.core.model.Administrators;
import cn.com.fqy.core.model.Query;
import cn.com.fqy.core.model.Store;
import cn.com.fqy.core.service.AdministratorsService;
@Controller
@RequestMapping("administrators")
......@@ -70,7 +73,25 @@ public class AdministratorsController extends BaseController{
administrators.setIsDeleted(1);
administrators.setAdministratorsId(administratorsId);
return administratorsService.updateAdministrators(administrators, getOperator());
}
/**
* 获取店铺信息
*/
@RequestMapping("getAdministrators")
@ResponseBody
public ResultInfo<List<Administrators>> getAdministrators(){
ResultInfo<List<Administrators>> result = new ResultInfo<>();
Administrators administrators = new Administrators();
administrators.setIsDeleted(0);
List<Administrators> administratorsList = administratorsService.getAdministratorsList(new Query(administrators));
if (administratorsList.size()>0) {
result.setCode("1");
result.setData(administratorsList);
}else {
result.setCode("0");
result.setMsg("暂无店铺管理员数据");
}
return result;
}
}
package cn.com.fqy.controller.mgt;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Controller;
......@@ -69,7 +71,26 @@ public class StoreController extends BaseController {
store.setIsDeleted(1);
store.setStoreId(storeId);
return storeService.updateStore(store, getOperator());
}
/**
* 获取店铺信息
*/
@RequestMapping("getStores")
@ResponseBody
public ResultInfo<List<Store>> getStores(){
ResultInfo<List<Store>> result = new ResultInfo<>();
Store store = new Store();
store.setIsDeleted(0);
store.setIsAuditing(1);
List<Store> storeList = storeService.getStoreList(new Query(store));
if (storeList.size()>0) {
result.setCode("1");
result.setData(storeList);
}else {
result.setCode("0");
result.setMsg("暂无店铺数据");
}
return result;
}
}
package cn.com.fqy.controller.mgt;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Controller;
......@@ -10,6 +12,7 @@ import cn.com.fqy.common.Operator;
import cn.com.fqy.common.ResultInfo;
import cn.com.fqy.core.common.BaseController;
import cn.com.fqy.core.common.PageFinder;
import cn.com.fqy.core.model.Administrators;
import cn.com.fqy.core.model.Query;
import cn.com.fqy.core.model.Worker;
import cn.com.fqy.core.service.WorkerService;
......@@ -71,4 +74,26 @@ public class WorkerController extends BaseController {
worker.setWorkerId(workerId);
return workerService.updateWorker(worker,getOperator());
}
/**
* 获取员工信息
*/
@RequestMapping("getWorkers")
@ResponseBody
public ResultInfo<List<Worker>> getWorkers(){
ResultInfo<List<Worker>> result = new ResultInfo<>();
Worker worker = new Worker();
worker.setIsDeleted(0);
worker.setIsAuditing(1);
List<Worker> workerList = workerService.getWorkerList(new Query(worker));
if (workerList.size()>0) {
result.setCode("1");
result.setData(workerList);
}else {
result.setCode("0");
result.setMsg("暂无员工数据");
}
return result;
}
}
......@@ -52,6 +52,8 @@ public class SysUser extends Entity<String> {
private String operatorId;
private List<SysRole> sysRole;
private String flag;
//店铺管理员编号
private String administratorsId;
/*Auto generated properties end*/
......@@ -85,6 +87,14 @@ public class SysUser extends Entity<String> {
this.userName = userName;
}
public String getAdministratorsId() {
return administratorsId;
}
public void setAdministratorsId(String administratorsId) {
this.administratorsId = administratorsId;
}
public String getPassword(){
return password;
}
......@@ -242,12 +252,13 @@ public class SysUser extends Entity<String> {
@Override
public String toString() {
return "SysUser ["
+ "userId = " + userId + ", userName = " + userName + ", password = " + password + ", realName = " + realName
+ ", sex = " + sex + ", mobilePhone = " + mobilePhone + ", memo = " + memo + ", isAvailable = " + isAvailable
+ ", isDeleted = " + isDeleted + ", createTime = " + createTime + ", createTimeStart = " + createTimeStart + ", createTimeEnd = " + createTimeEnd + ", updateTime = " + updateTime + ", updateTimeStart = " + updateTimeStart + ", updateTimeEnd = " + updateTimeEnd + ", operatorType = " + operatorType
+ ", operatorId = " + operatorId
+"]";
return "SysUser [userId=" + userId + ", userName=" + userName + ", password=" + password + ", realName="
+ realName + ", sex=" + sex + ", mobilePhone=" + mobilePhone + ", memo=" + memo + ", isAvailable="
+ isAvailable + ", isDeleted=" + isDeleted + ", deptId=" + deptId + ", createTime=" + createTime
+ ", createTimeStart=" + createTimeStart + ", createTimeEnd=" + createTimeEnd + ", updateTime="
+ updateTime + ", updateTimeStart=" + updateTimeStart + ", updateTimeEnd=" + updateTimeEnd
+ ", operatorType=" + operatorType + ", operatorId=" + operatorId + ", sysRole=" + sysRole + ", flag="
+ flag + ", administratorsId=" + administratorsId + "]";
}
}
......@@ -260,7 +260,7 @@ OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,IS_AVAILABLE
<where>
<include refid="listCommonWhere1"/>
</where>
ORDER BY SERIAL_NUMBER DESC
ORDER BY SERIAL_NUMBER DESC,CLICKS ASC
<![CDATA[LIMIT #{rowIndex},#{pageSize} ]]>
</select>
......
......@@ -18,6 +18,7 @@
<result column="OPERATOR_TYPE" property="operatorType" javaType="java.lang.Integer" jdbcType="TINYINT"/>
<result column="OPERATOR_ID" property="operatorId" javaType="java.lang.String" jdbcType="VARCHAR"/>
<result column="FLAG" property="flag" javaType="java.lang.String" jdbcType="VARCHAR"/>
<result column="ADMINISTRATORS_ID" property="administratorsId" javaType="java.lang.String" jdbcType="VARCHAR"/>
</resultMap>
<resultMap type="SysUser" id="SysUserAss" extends="SysUser">
<association property="sysRole" column="USER_ID"
......@@ -39,7 +40,8 @@
CREATE_TIME,
UPDATE_TIME,
OPERATOR_TYPE,
OPERATOR_ID
OPERATOR_ID,
ADMINISTRATORS_ID
) values (
#{userId,jdbcType = VARCHAR},
#{userName,jdbcType = VARCHAR},
......@@ -54,7 +56,8 @@
#{createTime,jdbcType = TIMESTAMP},
#{updateTime,jdbcType = TIMESTAMP},
#{operatorType,jdbcType = TINYINT},
#{operatorId,jdbcType = VARCHAR}
#{operatorId,jdbcType = VARCHAR},
#{administratorsId,jdbcType = VARCHAR}
)
</insert>
......@@ -100,6 +103,9 @@
<if test="operatorId!=null ">
OPERATOR_ID=#{operatorId,jdbcType = VARCHAR},
</if>
<if test="administratorsId!=null and administratorsId!=''">
ADMINISTRATORS_ID=#{administratorsId,jdbcType = VARCHAR},
</if>
</set>
<where>
AND USER_ID=#{userId}
......@@ -236,6 +242,9 @@
<if test="q.operatorId!=null ">
AND OPERATOR_ID=#{q.operatorId}
</if>
<if test="q.administratorsId!=null and q.administratorsId!=''">
AND ADMINISTRATORS_ID=#{q.administratorsId}
</if>
</if>
</sql>
......@@ -283,6 +292,9 @@
<if test="q.operatorId!=null ">
AND OPERATOR_ID=#{q.operatorId}
</if>
<if test="q.administratorsId!=null and q.administratorsId!=''">
AND ADMINISTRATORS_ID=#{q.administratorsId}
</if>
</if>
</sql>
......
......@@ -260,7 +260,7 @@ UPDATE_TIME,OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED
<where>
<include refid="listCommonWhere1"/>
</where>
ORDER BY SERIAL_NUMBER DESC
ORDER BY SERIAL_NUMBER DESC,CLICKS ASC
<![CDATA[LIMIT #{rowIndex},#{pageSize} ]]>
</select>
......
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