master
parent
772e38dbc4
commit
466cbe515f
@ -1,183 +0,0 @@
|
|||||||
package com.jingcheng.cms.controller;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.jingcheng.cms.service.CaseCategoryService;
|
|
||||||
import com.jingcheng.cms.service.OssService;
|
|
||||||
import com.jingcheng.cms.util.AjaxRequest;
|
|
||||||
import com.jingcheng.cms.util.AjaxResult;
|
|
||||||
import com.jingcheng.cms.util.LogUtils;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
|
||||||
import org.springframework.web.bind.annotation.CrossOrigin;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
|
|
||||||
@CrossOrigin
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/case-category")
|
|
||||||
public class CaseCategoryController {
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private CaseCategoryService caseCategoryService;
|
|
||||||
@Value("${oss.filedir}")
|
|
||||||
private String filedir;
|
|
||||||
private Logger logger = LogUtils.getBussinessLogger();
|
|
||||||
@Resource
|
|
||||||
private OssService ossService;
|
|
||||||
|
|
||||||
@RequestMapping("/get-all-category")
|
|
||||||
public AjaxResult getAllCategory(HttpServletRequest request) {
|
|
||||||
AjaxResult ajaxResult = new AjaxResult();
|
|
||||||
JSONObject data = caseCategoryService.getAllCaseCategory();
|
|
||||||
if (null!=data){
|
|
||||||
ajaxResult.setRetcode(AjaxResult.SUCCESS);
|
|
||||||
ajaxResult.setData(data);
|
|
||||||
}else {
|
|
||||||
ajaxResult.setRetcode(AjaxResult.FAILED);
|
|
||||||
}
|
|
||||||
return ajaxResult;
|
|
||||||
}
|
|
||||||
|
|
||||||
@RequestMapping("/get-category-by-parent-id")
|
|
||||||
public AjaxResult getCategoryByParentId(@RequestBody AjaxRequest ajaxRequest,HttpServletRequest request) {
|
|
||||||
AjaxResult ajaxResult = new AjaxResult();
|
|
||||||
JSONObject data = ajaxRequest.getData();
|
|
||||||
if (null == data){
|
|
||||||
ajaxResult.setRetcode(AjaxResult.FAILED);
|
|
||||||
ajaxResult.setRetmsg("data missing");
|
|
||||||
}else {
|
|
||||||
Integer pageNum = data.getInteger("pageNum");
|
|
||||||
Integer pageSize = data.getInteger("pageSize");
|
|
||||||
if (null==pageNum|| null == pageSize){
|
|
||||||
ajaxResult.setRetcode(AjaxResult.FAILED);
|
|
||||||
ajaxResult.setRetmsg("分页参数不可为空");
|
|
||||||
}else {
|
|
||||||
Long parentId = data.getLong("parentId");
|
|
||||||
ajaxResult.setRetcode(AjaxResult.SUCCESS);
|
|
||||||
ajaxResult.setData(caseCategoryService.getCaseCategoryByParentId(parentId,pageNum,pageSize));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ajaxResult;
|
|
||||||
}
|
|
||||||
|
|
||||||
@RequestMapping("/search")
|
|
||||||
public AjaxResult search(@RequestBody AjaxRequest ajaxRequest,HttpServletRequest request) {
|
|
||||||
AjaxResult ajaxResult = new AjaxResult();
|
|
||||||
JSONObject data = ajaxRequest.getData();
|
|
||||||
if (null == data){
|
|
||||||
ajaxResult.setRetcode(AjaxResult.FAILED);
|
|
||||||
ajaxResult.setRetmsg("data missing");
|
|
||||||
}else {
|
|
||||||
Integer pageNum = data.getInteger("pageNum");
|
|
||||||
Integer pageSize = data.getInteger("pageSize");
|
|
||||||
if (null==pageNum|| null == pageSize){
|
|
||||||
ajaxResult.setRetcode(AjaxResult.FAILED);
|
|
||||||
ajaxResult.setRetmsg("分页参数不可为空");
|
|
||||||
}else {
|
|
||||||
String name = data.getString("name");
|
|
||||||
if (StringUtils.isEmpty(name)){
|
|
||||||
ajaxResult.setRetcode(AjaxResult.FAILED);
|
|
||||||
ajaxResult.setRetmsg("搜索参数不可为空");
|
|
||||||
}else {
|
|
||||||
ajaxResult.setRetcode(AjaxResult.SUCCESS);
|
|
||||||
ajaxResult.setData(caseCategoryService.search(name,pageNum,pageSize));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ajaxResult;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增或者更新类别
|
|
||||||
* @param ajaxRequest
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@RequestMapping("/save-category")
|
|
||||||
public AjaxResult getAllCategory(@RequestBody AjaxRequest ajaxRequest) {
|
|
||||||
AjaxResult ajaxResult = new AjaxResult();
|
|
||||||
JSONObject data = ajaxRequest.getData();
|
|
||||||
if (null == data){
|
|
||||||
ajaxResult.setRetcode(AjaxResult.FAILED);
|
|
||||||
ajaxResult.setRetmsg("data missing");
|
|
||||||
}else {
|
|
||||||
ajaxResult = caseCategoryService.saveCategory(data);
|
|
||||||
}
|
|
||||||
return ajaxResult;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 后台获取分级分类
|
|
||||||
* @param ajaxRequest
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@RequestMapping("/get-bak-category-by-parent-id")
|
|
||||||
public AjaxResult getCategoryByParentId(@RequestBody AjaxRequest ajaxRequest) {
|
|
||||||
AjaxResult ajaxResult = new AjaxResult();
|
|
||||||
JSONObject data = ajaxRequest.getData();
|
|
||||||
if (null == data){
|
|
||||||
ajaxResult.setRetcode(AjaxResult.FAILED);
|
|
||||||
ajaxResult.setRetmsg("data missing");
|
|
||||||
}else {
|
|
||||||
Long parentId = data.getLong("parentId");
|
|
||||||
ajaxResult.setData(caseCategoryService.getBakCategoryByParentId(parentId));
|
|
||||||
}
|
|
||||||
return ajaxResult;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 后台模糊搜索分级分类
|
|
||||||
* @param ajaxRequest
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@RequestMapping("/search-bak-category")
|
|
||||||
public AjaxResult searchBakCategory(@RequestBody AjaxRequest ajaxRequest) {
|
|
||||||
AjaxResult ajaxResult = new AjaxResult();
|
|
||||||
JSONObject data = ajaxRequest.getData();
|
|
||||||
if (null == data) {
|
|
||||||
ajaxResult.setRetcode(AjaxResult.FAILED);
|
|
||||||
ajaxResult.setRetmsg("data missing");
|
|
||||||
} else {
|
|
||||||
Integer pageNum = data.getInteger("pageNum");
|
|
||||||
if (null==pageNum){
|
|
||||||
ajaxResult.setRetcode(AjaxResult.FAILED);
|
|
||||||
ajaxResult.setRetmsg("分页参数不可为空");
|
|
||||||
}else {
|
|
||||||
String name = data.getString("name");
|
|
||||||
ajaxResult.setRetcode(AjaxResult.SUCCESS);
|
|
||||||
ajaxResult.setData(caseCategoryService.searchBakCategory(name,pageNum));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ajaxResult;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 后台模糊搜索分级分类
|
|
||||||
* @param jsonObject
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@RequestMapping("/del-category")
|
|
||||||
public AjaxResult delCategory(@RequestBody JSONObject jsonObject) {
|
|
||||||
AjaxResult ajaxResult = new AjaxResult();
|
|
||||||
try{
|
|
||||||
Long categoryId = jsonObject.getLong("categoryId");
|
|
||||||
if (null==categoryId){
|
|
||||||
ajaxResult.setRetcode(AjaxResult.FAILED);
|
|
||||||
ajaxResult.setRetmsg("文章Id不可为空");
|
|
||||||
}else {
|
|
||||||
ajaxResult = caseCategoryService.delCategory(categoryId);
|
|
||||||
}
|
|
||||||
}catch (Exception e) {
|
|
||||||
|
|
||||||
e.printStackTrace();
|
|
||||||
ajaxResult.setRetmsg("操作失败:" + e.getMessage());
|
|
||||||
ajaxResult.setRetcode(AjaxResult.FAILED);
|
|
||||||
}
|
|
||||||
return ajaxResult;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,100 +0,0 @@
|
|||||||
package com.jingcheng.cms.controller;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.jingcheng.cms.service.CaseContentCommentsService;
|
|
||||||
import com.jingcheng.cms.util.AjaxRequest;
|
|
||||||
import com.jingcheng.cms.util.AjaxResult;
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
|
||||||
import org.springframework.web.bind.annotation.CrossOrigin;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
|
|
||||||
@CrossOrigin
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/case-content-comments")
|
|
||||||
public class CaseContentCommentsController {
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private CaseContentCommentsService caseContentCommentsService;
|
|
||||||
|
|
||||||
@RequestMapping("/get-comments-by-content-id")
|
|
||||||
public AjaxResult getCaseContentCommentsByContentId(@RequestBody AjaxRequest ajaxRequest, HttpServletRequest request) {
|
|
||||||
AjaxResult ajaxResult = new AjaxResult();
|
|
||||||
JSONObject data = ajaxRequest.getData();
|
|
||||||
if (null == data){
|
|
||||||
ajaxResult.setRetcode(AjaxResult.FAILED);
|
|
||||||
ajaxResult.setRetmsg("data missing");
|
|
||||||
}else {
|
|
||||||
Integer pageNum = data.getInteger("pageNum");
|
|
||||||
Integer pageSize = data.getInteger("pageSize");
|
|
||||||
if (null==pageNum|| null == pageSize){
|
|
||||||
ajaxResult.setRetcode(AjaxResult.FAILED);
|
|
||||||
ajaxResult.setRetmsg("分页参数不可为空");
|
|
||||||
}else {
|
|
||||||
Long contentId = data.getLong("contentId");
|
|
||||||
ajaxResult.setRetcode(AjaxResult.SUCCESS);
|
|
||||||
ajaxResult.setData(caseContentCommentsService.getCaseContentCommentsByContentId(contentId,pageNum,pageSize));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ajaxResult;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增评论
|
|
||||||
* @param ajaxRequest
|
|
||||||
* @param request
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@RequestMapping("/add-comments")
|
|
||||||
public AjaxResult addComments(@RequestBody AjaxRequest ajaxRequest, HttpServletRequest request) {
|
|
||||||
AjaxResult ajaxResult = new AjaxResult();
|
|
||||||
JSONObject data = ajaxRequest.getData();
|
|
||||||
if (null == data){
|
|
||||||
ajaxResult.setRetcode(AjaxResult.FAILED);
|
|
||||||
ajaxResult.setRetmsg("data missing");
|
|
||||||
}else {
|
|
||||||
Long contentId = data.getLong("contentId");
|
|
||||||
String comments = data.getString("comments");
|
|
||||||
if (null == contentId){
|
|
||||||
ajaxResult.setRetcode(AjaxResult.FAILED);
|
|
||||||
ajaxResult.setRetmsg("文章id不可为空");
|
|
||||||
}else {
|
|
||||||
if (StringUtils.isBlank(comments)){
|
|
||||||
ajaxResult.setRetcode(AjaxResult.FAILED);
|
|
||||||
ajaxResult.setRetmsg("文章评论内容不可为空");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ajaxResult =caseContentCommentsService.addComments(contentId,comments);
|
|
||||||
}
|
|
||||||
return ajaxResult;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除评论
|
|
||||||
* @param ajaxRequest
|
|
||||||
* @param request
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@RequestMapping("/del-comments")
|
|
||||||
public AjaxResult delComments(@RequestBody AjaxRequest ajaxRequest, HttpServletRequest request) {
|
|
||||||
AjaxResult ajaxResult = new AjaxResult();
|
|
||||||
JSONObject data = ajaxRequest.getData();
|
|
||||||
if (null == data){
|
|
||||||
ajaxResult.setRetcode(AjaxResult.FAILED);
|
|
||||||
ajaxResult.setRetmsg("data missing");
|
|
||||||
}else {
|
|
||||||
Long commentsId = data.getLong("contentId");
|
|
||||||
if (null == commentsId){
|
|
||||||
ajaxResult.setRetcode(AjaxResult.FAILED);
|
|
||||||
ajaxResult.setRetmsg("评论id不可为空");
|
|
||||||
}else {
|
|
||||||
ajaxResult =caseContentCommentsService.delComments(commentsId);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ajaxResult;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,18 +0,0 @@
|
|||||||
package com.jingcheng.cms.controller;
|
|
||||||
|
|
||||||
import com.jingcheng.cms.service.CaseContentLikeService;
|
|
||||||
import org.springframework.web.bind.annotation.CrossOrigin;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
|
|
||||||
@CrossOrigin
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/case-content-like")
|
|
||||||
public class CaseContentLikeController {
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private CaseContentLikeService caseContentLikeService;
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,47 +0,0 @@
|
|||||||
package com.jingcheng.cms.controller;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.jingcheng.cms.service.CaseContentScoreService;
|
|
||||||
import com.jingcheng.cms.util.AjaxRequest;
|
|
||||||
import com.jingcheng.cms.util.AjaxResult;
|
|
||||||
import org.springframework.web.bind.annotation.CrossOrigin;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
|
|
||||||
@CrossOrigin
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/case-content-score")
|
|
||||||
public class CaseContentScoreController {
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private CaseContentScoreService caseContentScoreService;
|
|
||||||
|
|
||||||
@RequestMapping("/add-score")
|
|
||||||
public AjaxResult addScore(@RequestBody AjaxRequest ajaxRequest, HttpServletRequest request) {
|
|
||||||
AjaxResult ajaxResult = new AjaxResult();
|
|
||||||
JSONObject data = ajaxRequest.getData();
|
|
||||||
if (null == data){
|
|
||||||
ajaxResult.setRetcode(AjaxResult.FAILED);
|
|
||||||
ajaxResult.setRetmsg("data missing");
|
|
||||||
}else {
|
|
||||||
Long contentId = data.getLong("contentId");
|
|
||||||
Double score = data.getDouble("score");
|
|
||||||
if (null==contentId){
|
|
||||||
ajaxResult.setRetcode(AjaxResult.FAILED);
|
|
||||||
ajaxResult.setRetmsg("文章id不可为空");
|
|
||||||
return ajaxResult;
|
|
||||||
}
|
|
||||||
if (null == score){
|
|
||||||
ajaxResult.setRetcode(AjaxResult.FAILED);
|
|
||||||
ajaxResult.setRetmsg("评分不可为空");
|
|
||||||
return ajaxResult;
|
|
||||||
}
|
|
||||||
ajaxResult = caseContentScoreService.addScore(contentId,score);
|
|
||||||
}
|
|
||||||
return ajaxResult;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,72 +0,0 @@
|
|||||||
package com.jingcheng.cms.controller;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.jingcheng.cms.model.CaseRecommend;
|
|
||||||
import com.jingcheng.cms.service.CaseRecommendService;
|
|
||||||
import com.jingcheng.cms.util.AjaxResult;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/case-recommend")
|
|
||||||
public class CaseRecommendController {
|
|
||||||
@Resource
|
|
||||||
private CaseRecommendService caseRecommendService;
|
|
||||||
|
|
||||||
@RequestMapping("/get-case-recommend")
|
|
||||||
public AjaxResult getAllCategory(HttpServletRequest request) {
|
|
||||||
AjaxResult ajaxResult = new AjaxResult();
|
|
||||||
List<CaseRecommend> caseRecommendList = caseRecommendService.getCaseRecommend();
|
|
||||||
if (null!=caseRecommendList){
|
|
||||||
ajaxResult.setRetcode(AjaxResult.SUCCESS);
|
|
||||||
ajaxResult.setData(caseRecommendList);
|
|
||||||
}else {
|
|
||||||
ajaxResult.setRetcode(AjaxResult.FAILED);
|
|
||||||
}
|
|
||||||
return ajaxResult;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增或者更新首页推荐
|
|
||||||
* @param jsonObject
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@RequestMapping("/save-case-recommend")
|
|
||||||
public AjaxResult saveCaseRecommend(@RequestBody JSONObject jsonObject) {
|
|
||||||
AjaxResult ajaxResult = new AjaxResult();
|
|
||||||
try{
|
|
||||||
ajaxResult = caseRecommendService.updateCaseRecommend(jsonObject);
|
|
||||||
}catch (Exception e) {
|
|
||||||
|
|
||||||
e.printStackTrace();
|
|
||||||
ajaxResult.setRetmsg("操作失败:" + e.getMessage());
|
|
||||||
ajaxResult.setRetcode(AjaxResult.FAILED);
|
|
||||||
}
|
|
||||||
return ajaxResult;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除文章
|
|
||||||
* @param jsonObject
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@RequestMapping("/del-recommend")
|
|
||||||
public AjaxResult delRecommend(@RequestBody JSONObject jsonObject) {
|
|
||||||
AjaxResult ajaxResult = new AjaxResult();
|
|
||||||
try{
|
|
||||||
Long recomendId = jsonObject.getLong("recommendId");
|
|
||||||
ajaxResult = caseRecommendService.delCaseRecommend(recomendId);
|
|
||||||
}catch (Exception e) {
|
|
||||||
|
|
||||||
e.printStackTrace();
|
|
||||||
ajaxResult.setRetmsg("操作失败:" + e.getMessage());
|
|
||||||
ajaxResult.setRetcode(AjaxResult.FAILED);
|
|
||||||
}
|
|
||||||
return ajaxResult;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -0,0 +1,49 @@
|
|||||||
|
package com.jingcheng.cms.controller;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.jingcheng.cms.service.PopularLabelService;
|
||||||
|
import com.jingcheng.cms.service.UsersService;
|
||||||
|
import com.jingcheng.cms.util.AjaxResult;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/users")
|
||||||
|
public class UsersController {
|
||||||
|
@Autowired
|
||||||
|
private UsersService usersService;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户列表
|
||||||
|
* @param jsonObject
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping("/users-list")
|
||||||
|
public AjaxResult getPopularLabelListByPage(@RequestBody JSONObject jsonObject) {
|
||||||
|
AjaxResult ajaxResult = new AjaxResult();
|
||||||
|
|
||||||
|
JSONObject pageJson= usersService.usersList(jsonObject);
|
||||||
|
ajaxResult.setData(pageJson);
|
||||||
|
return ajaxResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除用户
|
||||||
|
* @param jsonObject
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping("/del-users")
|
||||||
|
public AjaxResult delPopularLabel(@RequestBody JSONObject jsonObject) {
|
||||||
|
AjaxResult ajaxResult = new AjaxResult();
|
||||||
|
Long id = jsonObject.getLong("id");
|
||||||
|
if (null == id){
|
||||||
|
ajaxResult.setRetmsg("id不可为空");
|
||||||
|
return ajaxResult;
|
||||||
|
}
|
||||||
|
ajaxResult= usersService.delUsers(id);
|
||||||
|
return ajaxResult;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
<?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="com.jingcheng.cms.mapper.UsersMapper">
|
||||||
|
|
||||||
|
<insert id="addCategory" parameterType="com.jingcheng.cms.model.Users">
|
||||||
|
INSERT INTO users(`user_name`,`user_no`,`password`)
|
||||||
|
values (#{userName},#{userNo},#{password})
|
||||||
|
</insert>
|
||||||
|
</mapper>
|
||||||
Loading…
Reference in New Issue