| | |
| | | import com.google.gson.Gson;
|
| | | import com.google.gson.GsonBuilder;
|
| | | import com.google.gson.reflect.TypeToken;
|
| | | import com.yeshi.fanli.dto.taobao.TaoBaoShopInfoDTO;
|
| | | import com.yeshi.goods.facade.dto.taobao.TaoBaoShopInfoDTO;
|
| | | import com.yeshi.fanli.entity.brand.BrandClass;
|
| | | import com.yeshi.fanli.entity.brand.BrandClassShop;
|
| | | import com.yeshi.fanli.entity.brand.BrandInfo;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoShop;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoShopInfo;
|
| | | import com.yeshi.common.entity.taobao.TaoBaoShop;
|
| | | import com.yeshi.common.entity.taobao.TaoBaoShopInfo;
|
| | | import com.yeshi.fanli.exception.brand.BrandClassException;
|
| | | import com.yeshi.fanli.exception.brand.BrandClassShopException;
|
| | | import com.yeshi.fanli.exception.brand.BrandInfoException;
|
| | | import com.yeshi.fanli.service.inter.brand.BrandClassService;
|
| | | import com.yeshi.fanli.service.inter.brand.BrandClassShopService;
|
| | | import com.yeshi.fanli.service.inter.brand.BrandInfoService;
|
| | | import com.yeshi.fanli.tag.PageEntity;
|
| | | import com.yeshi.common.entity.PageEntity;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.taobao.TaoKeApiUtil;
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "switchStateClass")
|
| | | public void switchStateClass(String callback, Long id, PrintWriter out) {
|
| | | public void switchStateClass(AdminAcceptData acceptData,String callback, Long id, PrintWriter out) {
|
| | | try {
|
| | | brandClassService.switchState(id);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("操作成功"));
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "delete")
|
| | | public void delete(String callback, String idArray, PrintWriter out) {
|
| | | public void delete(AdminAcceptData acceptData,String callback, String idArray, PrintWriter out) {
|
| | | try {
|
| | | if (StringUtil.isNullOrEmpty(idArray)) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("请选择操作的数据"));
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "queryTaoBaoShop")
|
| | | public void queryTaoBaoShop(String callback, Integer pageIndex, Integer pageSize, String key, PrintWriter out) {
|
| | | public void queryTaoBaoShop(AdminAcceptData acceptData,String callback, Integer pageIndex, Integer pageSize, String key, PrintWriter out) {
|
| | |
|
| | | if (pageIndex == null || pageIndex < 1) {
|
| | | pageIndex = 1;
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "saveShopInfo")
|
| | | public void saveShopInfo(String callback, Long cid, String idArray, PrintWriter out) {
|
| | | public void saveShopInfo(AdminAcceptData acceptData,String callback, Long cid, String idArray, PrintWriter out) {
|
| | | try {
|
| | | if (StringUtil.isNullOrEmpty(idArray)) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("请选择操作的数据"));
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "queryClassShop")
|
| | | public void queryClassShop(String callback, Integer pageIndex, Integer pageSize, String key, Long cid,
|
| | | public void queryClassShop(AdminAcceptData acceptData,String callback, Integer pageIndex, Integer pageSize, String key, Long cid,
|
| | | Integer state, PrintWriter out) {
|
| | |
|
| | | if (pageIndex == null || pageIndex < 1) {
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "saveClassShop")
|
| | | public void saveClassShop(String callback, Long id, Long cid, String shopName, Integer state, Integer top,
|
| | | public void saveClassShop(AdminAcceptData acceptData,String callback, Long id, Long cid, String shopName, Integer state, Integer top,
|
| | | String key, HttpServletRequest request, PrintWriter out) {
|
| | | try {
|
| | | if (request instanceof MultipartHttpServletRequest) {
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "updateOrderClassShop")
|
| | | public void updateOrderClassShop(String callback, Long id, Integer moveType, PrintWriter out) {
|
| | | public void updateOrderClassShop(AdminAcceptData acceptData,String callback, Long id, Integer moveType, PrintWriter out) {
|
| | | try {
|
| | | brandClassShopService.updateOrder(id, moveType);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("操作成功"));
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "deleteClassShop")
|
| | | public void deleteClassShop(String callback, String idArray, PrintWriter out) {
|
| | | public void deleteClassShop(AdminAcceptData acceptData,String callback, String idArray, PrintWriter out) {
|
| | | try {
|
| | | if (StringUtil.isNullOrEmpty(idArray)) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("请选择操作的数据"));
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "saveBrand")
|
| | | public void saveBrand(String callback, BrandInfo brandInfo, HttpServletRequest request, PrintWriter out) {
|
| | | public void saveBrand(AdminAcceptData acceptData,String callback, BrandInfo brandInfo, HttpServletRequest request, PrintWriter out) {
|
| | | try {
|
| | | // 1. 先判断httpRequest 是否含有文件类型
|
| | | if (request instanceof MultipartHttpServletRequest) {
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "switchStateBrand")
|
| | | public void switchStateBrand(String callback, Long id, PrintWriter out) {
|
| | | public void switchStateBrand(AdminAcceptData acceptData,String callback, Long id, PrintWriter out) {
|
| | | try {
|
| | | brandInfoService.switchState(id);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("操作成功"));
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "deleteBrand")
|
| | | public void deleteBrand(String callback, String idArray, PrintWriter out) {
|
| | | public void deleteBrand(AdminAcceptData acceptData,String callback, String idArray, PrintWriter out) {
|
| | | try {
|
| | | if (StringUtil.isNullOrEmpty(idArray)) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("请选择操作的数据"));
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "updateOrderBrand")
|
| | | public void updateOrderBrand(String callback, Long id, Integer moveType, PrintWriter out) {
|
| | | public void updateOrderBrand(AdminAcceptData acceptData,String callback, Long id, Integer moveType, PrintWriter out) {
|
| | | try {
|
| | | brandInfoService.updateOrder(id, moveType);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("操作成功"));
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "queryBrand")
|
| | | public void queryBrand(String callback, Integer pageIndex, Integer pageSize, String key, Long cid, Integer state,
|
| | | public void queryBrand(AdminAcceptData acceptData,String callback, Integer pageIndex, Integer pageSize, String key, Long cid, Integer state,
|
| | | Integer showState, PrintWriter out) {
|
| | |
|
| | | if (pageIndex == null || pageIndex < 1) {
|