| | |
| | | import javax.annotation.Resource;
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | |
|
| | | import com.yeshi.fanli.entity.accept.AdminAcceptData;
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.springframework.web.multipart.MultipartHttpServletRequest;
|
| | |
| | | * 保存信息
|
| | | *
|
| | | * @param callback
|
| | | * @param special
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "save")
|
| | | public void save(String callback, GoodsSubClass goodsSubClass, Long pid, Integer type, Long labelId,
|
| | | HttpServletRequest request, PrintWriter out) {
|
| | | public void save(AdminAcceptData acceptData, String callback, GoodsSubClass goodsSubClass, Long pid, Integer type, Long labelId,
|
| | | HttpServletRequest request, PrintWriter out) {
|
| | | if (goodsSubClass.getTaobaoCids() != null)
|
| | | goodsSubClass.setTaobaoCids(goodsSubClass.getTaobaoCids().replace(",", ","));
|
| | |
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "switchState")
|
| | | public void switchState(String callback, Long id, PrintWriter out) {
|
| | | public void switchState(AdminAcceptData acceptData,String callback, Long id, PrintWriter out) {
|
| | | try {
|
| | | goodsSubClassService.switchState(id);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("操作成功"));
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "deleteBatch")
|
| | | public void deleteBatch(String callback, String ids, PrintWriter out) {
|
| | | public void deleteBatch(AdminAcceptData acceptData,String callback, String ids, PrintWriter out) {
|
| | | Gson gson = new Gson();
|
| | | try {
|
| | | List<String> recordIds = gson.fromJson(ids, new TypeToken<ArrayList<String>>() {
|
| | |
| | | * 删除图片
|
| | | *
|
| | | * @param callback
|
| | | * @param file
|
| | | * @param out
|
| | | * @param response
|
| | | */
|
| | | @RequestMapping(value = "removePicture")
|
| | | public void removePicture(String callback, Long id, PrintWriter out) {
|
| | | public void removePicture(AdminAcceptData acceptData,String callback, Long id, PrintWriter out) {
|
| | | try {
|
| | | GoodsSubClass goodsSubClass = goodsSubClassService.selectByPrimaryKey(id);
|
| | |
|
| | |
| | | * 查询一级下的所有二级类别
|
| | | *
|
| | | * @param callback
|
| | | * @param rootId
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "querySub")
|
| | | public void querySub(String callback, Long pid, Integer type, PrintWriter out) {
|
| | | public void querySub(AdminAcceptData acceptData,String callback, Long pid, Integer type, PrintWriter out) {
|
| | | try {
|
| | | if (pid == null) {
|
| | | out.print(JsonUtil.loadFalseResult("上级id为空"));
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "queryOverSecond")
|
| | | public void queryOverSecond(String callback, Long pid, PrintWriter out) {
|
| | | public void queryOverSecond(AdminAcceptData acceptData,String callback, Long pid, PrintWriter out) {
|
| | | try {
|
| | | Integer state = null;
|
| | | List<GoodsSubClass> goodsSubClassList = goodsSubClassService.queryByPid(pid, state);
|
| | |
| | | * 修改排序
|
| | | *
|
| | | * @param callback
|
| | | * @param goodsClass
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "saveOrder")
|
| | | public void saveOrder(String callback, Long id, Integer type, Integer moveType, PrintWriter out) {
|
| | | public void saveOrder(AdminAcceptData acceptData,String callback, Long id, Integer type, Integer moveType, PrintWriter out) {
|
| | | try {
|
| | | if (moveType == null || (!moveType.equals(1) && !moveType.equals(-1))) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("传递的类型不正确"));
|