项目更新
This commit is contained in:
parent
65cfba45bb
commit
0a83139244
@ -3,9 +3,11 @@ package cn.com.tenlion.aishop;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
||||
|
||||
@EnableSwagger2
|
||||
@EnableScheduling
|
||||
@SpringBootApplication(scanBasePackages = {"ink.wgink", "cn.com.tenlion"} )
|
||||
@MapperScan(basePackages = {"ink.wgink.**.dao", "cn.com.tenlion.**.dao"})
|
||||
public class SystemAishopApplication {
|
||||
|
@ -39,10 +39,10 @@ public class CorrectionResourceController extends DefaultBaseController {
|
||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PostMapping("save")
|
||||
@PostMapping("save/{userId}")
|
||||
@CheckRequestBodyAnnotation
|
||||
public SuccessResult save(@RequestBody CorrectionVO correctionVO) {
|
||||
correctionService.save(correctionVO);
|
||||
public SuccessResult saveByUser(@RequestBody CorrectionVO correctionVO, @PathVariable String userId) {
|
||||
correctionService.saveByUser(correctionVO, userId);
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,48 @@
|
||||
package cn.com.tenlion.aishop.controller.resource.data;
|
||||
|
||||
import cn.com.tenlion.aishop.pojo.dtos.goods.GoodsDTO;
|
||||
import cn.com.tenlion.aishop.service.goods.IGoodsService;
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import ink.wgink.module.dictionary.pojo.dtos.DataDTO;
|
||||
import ink.wgink.module.dictionary.service.IDataService;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.result.ErrorResult;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @ClassName: GoodsResourceController
|
||||
* @Description: 商品
|
||||
* @Author: CodeFactory
|
||||
* @Date: 2024-04-18 10:35:10
|
||||
* @Version: 3.0
|
||||
**/
|
||||
@Api(tags = ISystemConstant.API_TAGS_RESOURCE_PREFIX + "商品接口")
|
||||
@RestController
|
||||
@RequestMapping(ISystemConstant.RESOURCE_PREFIX + "/aishop-data")
|
||||
public class AiShopDataResourceController extends DefaultBaseController {
|
||||
|
||||
@Autowired
|
||||
private IDataService iDataService;
|
||||
|
||||
@ApiOperation(value = "数据字典", notes = "数据字典接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"),
|
||||
@ApiImplicitParam(name = "dataId", value = "数据字典ID", paramType = "path")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("list/{dataId}")
|
||||
public List<DataDTO> get(@PathVariable("dataId") String dataId) {
|
||||
return iDataService.listAllByParentId(dataId);
|
||||
}
|
||||
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
package cn.com.tenlion.aishop.controller.resource.goods;
|
||||
|
||||
import cn.com.tenlion.aishop.pojo.vos.goodslog.GoodslogVO;
|
||||
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
@ -34,47 +35,18 @@ public class GoodsResourceController extends DefaultBaseController {
|
||||
@Autowired
|
||||
private IGoodsService goodsService;
|
||||
|
||||
@ApiOperation(value = "新增商品", notes = "新增商品接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query")
|
||||
})
|
||||
@ApiOperation(value = "著作权信息审核", notes = "著作权信息审核接口")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PostMapping("save")
|
||||
@CheckRequestBodyAnnotation
|
||||
public SuccessResult save(@RequestBody GoodsVO goodsVO) {
|
||||
goodsService.save(goodsVO);
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除商品(id列表)", notes = "删除商品(id列表)接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"),
|
||||
@ApiImplicitParam(name = "ids", value = "ID列表,用下划线分隔", paramType = "path", example = "1_2_3")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@DeleteMapping("remove/{ids}")
|
||||
public SuccessResult remove(@PathVariable("ids") String ids) {
|
||||
goodsService.remove(Arrays.asList(ids.split("\\_")));
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "修改商品", notes = "修改商品接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"),
|
||||
@ApiImplicitParam(name = "goodsId", value = "商品ID", paramType = "path")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PutMapping("update/{goodsId}")
|
||||
@CheckRequestBodyAnnotation
|
||||
public SuccessResult update(@PathVariable("goodsId") String goodsId, @RequestBody GoodsVO goodsVO) {
|
||||
goodsService.update(goodsId, goodsVO);
|
||||
@PutMapping("check")
|
||||
public SuccessResult check(@RequestBody GoodslogVO goodsLogVO) {
|
||||
goodsService.saveCheck(goodsLogVO);
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "商品详情", notes = "商品详情接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"),
|
||||
@ApiImplicitParam(name = "goodsId", value = "商品ID", paramType = "path")
|
||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"),
|
||||
@ApiImplicitParam(name = "goodsId", value = "商品ID", paramType = "path")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("get/{goodsId}")
|
||||
@ -82,25 +54,14 @@ public class GoodsResourceController extends DefaultBaseController {
|
||||
return goodsService.get(goodsId);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "商品列表", notes = "商品列表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("list")
|
||||
public List<GoodsDTO> list() {
|
||||
Map<String, Object> params = requestParams();
|
||||
return goodsService.list(params);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "商品分页列表", notes = "商品分页列表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"),
|
||||
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"),
|
||||
@ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"),
|
||||
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String")
|
||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"),
|
||||
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"),
|
||||
@ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"),
|
||||
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("listpage")
|
||||
@ -110,12 +71,61 @@ public class GoodsResourceController extends DefaultBaseController {
|
||||
return goodsService.listPage(page);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "商品统计", notes = "商品统计接口")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("count")
|
||||
SuccessResultData<Integer> count() {
|
||||
Map<String, Object> params = requestParams();
|
||||
return new SuccessResultData<>(goodsService.count(params));
|
||||
}
|
||||
// @ApiOperation(value = "新增商品", notes = "新增商品接口")
|
||||
// @ApiImplicitParams({
|
||||
// @ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query")
|
||||
// })
|
||||
// @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
// @PostMapping("save")
|
||||
// @CheckRequestBodyAnnotation
|
||||
// public SuccessResult save(@RequestBody GoodsVO goodsVO) {
|
||||
// goodsService.save(goodsVO);
|
||||
// return new SuccessResult();
|
||||
// }
|
||||
//
|
||||
// @ApiOperation(value = "删除商品(id列表)", notes = "删除商品(id列表)接口")
|
||||
// @ApiImplicitParams({
|
||||
// @ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"),
|
||||
// @ApiImplicitParam(name = "ids", value = "ID列表,用下划线分隔", paramType = "path", example = "1_2_3")
|
||||
// })
|
||||
// @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
// @DeleteMapping("remove/{ids}")
|
||||
// public SuccessResult remove(@PathVariable("ids") String ids) {
|
||||
// goodsService.remove(Arrays.asList(ids.split("\\_")));
|
||||
// return new SuccessResult();
|
||||
// }
|
||||
//
|
||||
// @ApiOperation(value = "修改商品", notes = "修改商品接口")
|
||||
// @ApiImplicitParams({
|
||||
// @ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"),
|
||||
// @ApiImplicitParam(name = "goodsId", value = "商品ID", paramType = "path")
|
||||
// })
|
||||
// @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
// @PutMapping("update/{goodsId}")
|
||||
// @CheckRequestBodyAnnotation
|
||||
// public SuccessResult update(@PathVariable("goodsId") String goodsId, @RequestBody GoodsVO goodsVO) {
|
||||
// goodsService.update(goodsId, goodsVO);
|
||||
// return new SuccessResult();
|
||||
// }
|
||||
|
||||
// @ApiOperation(value = "商品列表", notes = "商品列表接口")
|
||||
// @ApiImplicitParams({
|
||||
// @ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query")
|
||||
// })
|
||||
// @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
// @GetMapping("list")
|
||||
// public List<GoodsDTO> list() {
|
||||
// Map<String, Object> params = requestParams();
|
||||
// return goodsService.list(params);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// @ApiOperation(value = "商品统计", notes = "商品统计接口")
|
||||
// @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
// @GetMapping("count")
|
||||
// SuccessResultData<Integer> count() {
|
||||
// Map<String, Object> params = requestParams();
|
||||
// return new SuccessResultData<>(goodsService.count(params));
|
||||
// }
|
||||
|
||||
}
|
@ -34,7 +34,18 @@ public class GoodslogResourceController extends DefaultBaseController {
|
||||
@Autowired
|
||||
private IGoodslogService goodslogService;
|
||||
|
||||
@ApiOperation(value = "新增商品日志", notes = "新增商品日志接口")
|
||||
@ApiOperation(value = "商品日志列表", notes = "商品日志列表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("list")
|
||||
public List<GoodslogDTO> list() {
|
||||
Map<String, Object> params = requestParams();
|
||||
return goodslogService.list(params);
|
||||
}
|
||||
|
||||
/*@ApiOperation(value = "新增商品日志", notes = "新增商品日志接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query")
|
||||
})
|
||||
@ -80,20 +91,9 @@ public class GoodslogResourceController extends DefaultBaseController {
|
||||
@GetMapping("get/{goodslogId}")
|
||||
public GoodslogDTO get(@PathVariable("goodslogId") String goodslogId) {
|
||||
return goodslogService.get(goodslogId);
|
||||
}
|
||||
}*/
|
||||
|
||||
@ApiOperation(value = "商品日志列表", notes = "商品日志列表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("list")
|
||||
public List<GoodslogDTO> list() {
|
||||
Map<String, Object> params = requestParams();
|
||||
return goodslogService.list(params);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "商品日志分页列表", notes = "商品日志分页列表接口")
|
||||
/* @ApiOperation(value = "商品日志分页列表", notes = "商品日志分页列表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"),
|
||||
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"),
|
||||
@ -116,6 +116,6 @@ public class GoodslogResourceController extends DefaultBaseController {
|
||||
SuccessResultData<Integer> count() {
|
||||
Map<String, Object> params = requestParams();
|
||||
return new SuccessResultData<>(goodslogService.count(params));
|
||||
}
|
||||
}*/
|
||||
|
||||
}
|
@ -1,5 +1,7 @@
|
||||
package cn.com.tenlion.aishop.controller.resource.order;
|
||||
|
||||
import cn.com.tenlion.aishop.pojo.dtos.goods.GoodsSimpleDTO;
|
||||
import cn.com.tenlion.aishop.pojo.dtos.order.OrderBaseDTO;
|
||||
import ink.wgink.annotation.CheckRequestBodyAnnotation;
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
@ -34,88 +36,134 @@ public class OrderResourceController extends DefaultBaseController {
|
||||
@Autowired
|
||||
private IOrderService orderService;
|
||||
|
||||
@ApiOperation(value = "新增订单", notes = "新增订单接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query")
|
||||
})
|
||||
@ApiOperation(value = "订单著作权详情", notes = "订单著作权详情")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PostMapping("save")
|
||||
@CheckRequestBodyAnnotation
|
||||
public SuccessResult save(@RequestBody OrderVO orderVO) {
|
||||
orderService.save(orderVO);
|
||||
return new SuccessResult();
|
||||
@GetMapping("get-goods/{orderId}")
|
||||
public GoodsSimpleDTO getGoods(@PathVariable("orderId") String orderId) {
|
||||
return orderService.getByGoods(orderId);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除订单(id列表)", notes = "删除订单(id列表)接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"),
|
||||
@ApiImplicitParam(name = "ids", value = "ID列表,用下划线分隔", paramType = "path", example = "1_2_3")
|
||||
})
|
||||
@ApiOperation(value = "订单详情", notes = "订单详情")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@DeleteMapping("remove/{ids}")
|
||||
public SuccessResult remove(@PathVariable("ids") String ids) {
|
||||
orderService.remove(Arrays.asList(ids.split("\\_")));
|
||||
return new SuccessResult();
|
||||
@GetMapping("getbase/{orderId}")
|
||||
public OrderBaseDTO getBase(@PathVariable("orderId") String orderId) {
|
||||
return orderService.getOrderResource(orderId);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "修改订单", notes = "修改订单接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"),
|
||||
@ApiImplicitParam(name = "orderId", value = "订单ID", paramType = "path")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PutMapping("update/{orderId}")
|
||||
@CheckRequestBodyAnnotation
|
||||
public SuccessResult update(@PathVariable("orderId") String orderId, @RequestBody OrderVO orderVO) {
|
||||
orderService.update(orderId, orderVO);
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "订单详情", notes = "订单详情接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"),
|
||||
@ApiImplicitParam(name = "orderId", value = "订单ID", paramType = "path")
|
||||
})
|
||||
@ApiOperation(value = "订单详情", notes = "订单详情")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("get/{orderId}")
|
||||
public OrderDTO get(@PathVariable("orderId") String orderId) {
|
||||
return orderService.get(orderId);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "订单列表", notes = "订单列表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query")
|
||||
})
|
||||
@ApiOperation(value = "确认下证", notes = "确认下证接口")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("list")
|
||||
public List<OrderDTO> list() {
|
||||
Map<String, Object> params = requestParams();
|
||||
return orderService.list(params);
|
||||
@PutMapping("saveresult/{orderId}/{producePhoto}/{userId}")
|
||||
public synchronized SuccessResult saveResult(@PathVariable("orderId") String orderId, @PathVariable("producePhoto") String producePhoto, @PathVariable("userId") String userId) {
|
||||
orderService.saveByUser(orderId, producePhoto, userId);
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
||||
@ApiOperation(value = "订单分页列表", notes = "订单分页列表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"),
|
||||
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"),
|
||||
@ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"),
|
||||
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String")
|
||||
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"),
|
||||
@ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"),
|
||||
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String")
|
||||
})
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("listpage")
|
||||
public SuccessResultList<List<OrderDTO>> listPage(ListPage page) {
|
||||
Map<String, Object> params = requestParams();
|
||||
params.put("systemOrder", "systemOrder");
|
||||
page.setParams(params);
|
||||
return orderService.listPage(page);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "订单统计", notes = "订单统计接口")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@GetMapping("count")
|
||||
SuccessResultData<Integer> count() {
|
||||
Map<String, Object> params = requestParams();
|
||||
return new SuccessResultData<>(orderService.count(params));
|
||||
}
|
||||
// @ApiOperation(value = "新增订单", notes = "新增订单接口")
|
||||
// @ApiImplicitParams({
|
||||
// @ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query")
|
||||
// })
|
||||
// @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
// @PostMapping("save")
|
||||
// @CheckRequestBodyAnnotation
|
||||
// public SuccessResult save(@RequestBody OrderVO orderVO) {
|
||||
// orderService.save(orderVO);
|
||||
// return new SuccessResult();
|
||||
// }
|
||||
//
|
||||
// @ApiOperation(value = "删除订单(id列表)", notes = "删除订单(id列表)接口")
|
||||
// @ApiImplicitParams({
|
||||
// @ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"),
|
||||
// @ApiImplicitParam(name = "ids", value = "ID列表,用下划线分隔", paramType = "path", example = "1_2_3")
|
||||
// })
|
||||
// @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
// @DeleteMapping("remove/{ids}")
|
||||
// public SuccessResult remove(@PathVariable("ids") String ids) {
|
||||
// orderService.remove(Arrays.asList(ids.split("\\_")));
|
||||
// return new SuccessResult();
|
||||
// }
|
||||
//
|
||||
// @ApiOperation(value = "修改订单", notes = "修改订单接口")
|
||||
// @ApiImplicitParams({
|
||||
// @ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"),
|
||||
// @ApiImplicitParam(name = "orderId", value = "订单ID", paramType = "path")
|
||||
// })
|
||||
// @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
// @PutMapping("update/{orderId}")
|
||||
// @CheckRequestBodyAnnotation
|
||||
// public SuccessResult update(@PathVariable("orderId") String orderId, @RequestBody OrderVO orderVO) {
|
||||
// orderService.update(orderId, orderVO);
|
||||
// return new SuccessResult();
|
||||
// }
|
||||
//
|
||||
// @ApiOperation(value = "订单详情", notes = "订单详情接口")
|
||||
// @ApiImplicitParams({
|
||||
// @ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"),
|
||||
// @ApiImplicitParam(name = "orderId", value = "订单ID", paramType = "path")
|
||||
// })
|
||||
// @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
// @GetMapping("get/{orderId}")
|
||||
// public OrderDTO get(@PathVariable("orderId") String orderId) {
|
||||
// return orderService.get(orderId);
|
||||
// }
|
||||
//
|
||||
// @ApiOperation(value = "订单列表", notes = "订单列表接口")
|
||||
// @ApiImplicitParams({
|
||||
// @ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query")
|
||||
// })
|
||||
// @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
// @GetMapping("list")
|
||||
// public List<OrderDTO> list() {
|
||||
// Map<String, Object> params = requestParams();
|
||||
// return orderService.list(params);
|
||||
// }
|
||||
//
|
||||
// @ApiOperation(value = "订单分页列表", notes = "订单分页列表接口")
|
||||
// @ApiImplicitParams({
|
||||
// @ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"),
|
||||
// @ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"),
|
||||
// @ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"),
|
||||
// @ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"),
|
||||
// @ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"),
|
||||
// @ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String")
|
||||
// })
|
||||
// @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
// @GetMapping("listpage")
|
||||
// public SuccessResultList<List<OrderDTO>> listPage(ListPage page) {
|
||||
// Map<String, Object> params = requestParams();
|
||||
// page.setParams(params);
|
||||
// return orderService.listPage(page);
|
||||
// }
|
||||
//
|
||||
// @ApiOperation(value = "订单统计", notes = "订单统计接口")
|
||||
// @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
// @GetMapping("count")
|
||||
// SuccessResultData<Integer> count() {
|
||||
// Map<String, Object> params = requestParams();
|
||||
// return new SuccessResultData<>(orderService.count(params));
|
||||
// }
|
||||
|
||||
}
|
@ -2,6 +2,7 @@ package cn.com.tenlion.aishop.controller.route.correction;
|
||||
|
||||
import cn.com.tenlion.aishop.pojo.dtos.order.OrderBaseDTO;
|
||||
import cn.com.tenlion.aishop.service.order.IOrderService;
|
||||
import cn.com.tenlion.aishop.util.SystemConfig;
|
||||
import ink.wgink.common.base.DefaultBaseController;
|
||||
import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import io.swagger.annotations.*;
|
||||
@ -24,6 +25,9 @@ public class CorrectionRouteController extends DefaultBaseController {
|
||||
@Autowired
|
||||
private IOrderService iOrderService;
|
||||
|
||||
@Autowired
|
||||
private SystemConfig systemConfig;
|
||||
|
||||
@GetMapping("save")
|
||||
public ModelAndView save() {
|
||||
return new ModelAndView("correction/save");
|
||||
@ -31,12 +35,16 @@ public class CorrectionRouteController extends DefaultBaseController {
|
||||
|
||||
@GetMapping("update")
|
||||
public ModelAndView update() {
|
||||
return new ModelAndView("correction/update");
|
||||
ModelAndView mv = new ModelAndView("correction/update");
|
||||
mv.addObject("accountServicePath", systemConfig.getAccountServicePath());
|
||||
return mv;
|
||||
}
|
||||
|
||||
@GetMapping("show")
|
||||
public ModelAndView show() {
|
||||
return new ModelAndView("correction/show");
|
||||
ModelAndView mv = new ModelAndView("correction/show");
|
||||
mv.addObject("accountServicePath", systemConfig.getAccountServicePath());
|
||||
return mv;
|
||||
}
|
||||
|
||||
@GetMapping("show-system")
|
||||
|
@ -45,6 +45,7 @@ public class OrderRouteController extends DefaultBaseController {
|
||||
String systemRoleId = systemConfig.getSystemRoleId();
|
||||
ModelAndView mv = new ModelAndView("404");
|
||||
mv.addObject("orderDTO",baseDTO);
|
||||
mv.addObject("accountServicePath", systemConfig.getAccountServicePath());
|
||||
if (securityComponent.getCurrentUser().getUserUsername().equals("admin") || systemRoleId.contains(securityComponent.getCurrentUser().getRoles().get(0).getRoleId())) {
|
||||
mv.setViewName("order/update");
|
||||
}
|
||||
@ -64,12 +65,16 @@ public class OrderRouteController extends DefaultBaseController {
|
||||
|
||||
@GetMapping("list-sell")
|
||||
public ModelAndView listSell() {
|
||||
return new ModelAndView("order/list-sell");
|
||||
ModelAndView mv = new ModelAndView("order/list-sell");
|
||||
mv.addObject("accountServicePath", systemConfig.getAccountServicePath());
|
||||
return mv;
|
||||
}
|
||||
|
||||
@GetMapping("list-buy")
|
||||
public ModelAndView listBuy() {
|
||||
return new ModelAndView("order/list-buy");
|
||||
ModelAndView mv = new ModelAndView("order/list-buy");
|
||||
mv.addObject("accountServicePath", systemConfig.getAccountServicePath());
|
||||
return mv;
|
||||
}
|
||||
|
||||
@GetMapping("pay")
|
||||
|
@ -9,6 +9,7 @@ import cn.com.tenlion.aishop.pojo.pos.order.OrderPO;
|
||||
import cn.com.tenlion.aishop.pojo.dtos.order.OrderDTO;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -120,4 +121,6 @@ public interface IOrderDao {
|
||||
void updateStatus(Map<String, Object> params);
|
||||
|
||||
void updateResult(Map<String, Object> params);
|
||||
|
||||
void updateClose(HashMap<Object, Object> objectObjectHashMap);
|
||||
}
|
@ -185,4 +185,5 @@ public interface ICorrectionService {
|
||||
*/
|
||||
Integer count(Map<String, Object> params);
|
||||
|
||||
String saveByUser(CorrectionVO correctionVO, String userId);
|
||||
}
|
@ -74,6 +74,83 @@ public class CorrectionServiceImpl extends DefaultBaseService implements ICorrec
|
||||
@Autowired
|
||||
private SystemConfig systemConfig;
|
||||
|
||||
@Override
|
||||
public String saveByUser(CorrectionVO correctionVO, String userId) {
|
||||
OrderDTO orderDTO = iOrderService.get(correctionVO.getOrderId());
|
||||
GoodsonlineDTO goodsonlineDTO = iGoodsonlineService.getByGoodsIdAndNumber(orderDTO.getGoodsId(), orderDTO.getGoodsVnumber());
|
||||
if(orderDTO == null) {
|
||||
throw new SaveException("订单不存在");
|
||||
}
|
||||
String correctionId = UUIDUtil.getUUID();
|
||||
Map<String, Object> params = HashMapUtil.beanToMap(correctionVO);
|
||||
params.put("correctionId", correctionId);
|
||||
params.put("creator", userId);
|
||||
params.put("gmtCreate", DateUtil.getTime());
|
||||
params.put("modifier", userId);
|
||||
params.put("gmtModified", DateUtil.getTime());
|
||||
params.put("isDelete", 0);
|
||||
if (correctionVO.getCorrectionParentId().equals("0")) {
|
||||
if (StringUtils.isEmpty(correctionVO.getCorrectionTitle())) {
|
||||
throw new SaveException("主题不能为空");
|
||||
}
|
||||
String type = "";
|
||||
if(correctionVO.getCorrectionType().contains("1")) {
|
||||
type = "卖家";
|
||||
}
|
||||
if(correctionVO.getCorrectionType().contains("2")) {
|
||||
if (type.length() > 0) {
|
||||
type = type + "、";
|
||||
}
|
||||
type = type + "买家";
|
||||
}
|
||||
GoodslogVO goodsLogVO = new GoodslogVO();
|
||||
goodsLogVO.setGoodslogType("ORDER");
|
||||
goodsLogVO.setGoodslogTime(DateUtil.getTime());
|
||||
goodsLogVO.setGoodslogName("平台发起资料补充");
|
||||
goodsLogVO.setGoodslogStatus("");
|
||||
goodsLogVO.setGoodsId(orderDTO.getGoodsId());
|
||||
goodsLogVO.setGoodslogContent("需要 " + type + " 进行资料补充");
|
||||
iGoodslogService.saveByUser(goodsLogVO, userId);
|
||||
}else{
|
||||
if (params.get("creator").toString().equals(orderDTO.getSellUserId())) {
|
||||
params.put("correctionType", "卖家");
|
||||
GoodslogVO goodsLogVO = new GoodslogVO();
|
||||
goodsLogVO.setGoodslogType("ORDER");
|
||||
goodsLogVO.setGoodslogTime(DateUtil.getTime());
|
||||
goodsLogVO.setGoodslogName("卖家填入补充资料");
|
||||
goodsLogVO.setGoodslogStatus("");
|
||||
goodsLogVO.setGoodsId(orderDTO.getGoodsId());
|
||||
goodsLogVO.setGoodslogContent("");
|
||||
iGoodslogService.saveByUser(goodsLogVO, userId);
|
||||
}
|
||||
if (params.get("creator").toString().equals(orderDTO.getBuyUserId())) {
|
||||
params.put("correctionType", "买家");
|
||||
GoodslogVO goodsLogVO = new GoodslogVO();
|
||||
goodsLogVO.setGoodslogType("ORDER");
|
||||
goodsLogVO.setGoodslogTime(DateUtil.getTime());
|
||||
goodsLogVO.setGoodslogName("买家填入补充资料");
|
||||
goodsLogVO.setGoodslogStatus("");
|
||||
goodsLogVO.setGoodsId(orderDTO.getGoodsId());
|
||||
goodsLogVO.setGoodslogContent("");
|
||||
iGoodslogService.saveByUser(goodsLogVO, userId);
|
||||
}
|
||||
}
|
||||
params.put("createTime", DateUtil.getTime());
|
||||
params.put("createUserId", params.get("creator").toString());
|
||||
correctionDao.save(params);
|
||||
if (systemConfig.getSmsSwitch()) {
|
||||
if (correctionVO.getCorrectionParentId().equals("0")) {
|
||||
if(correctionVO.getCorrectionType().contains("1")) {
|
||||
iSmsService.sendContentDirectlyByPhone(goodsonlineDTO.getGoodsLeaderPhone(), "著作权交易订单(" + goodsonlineDTO.getGoodsName() + " " + goodsonlineDTO.getGoodsVersion() + "),需要您补充资料(" + correctionVO.getCorrectionTitle() + ")");
|
||||
}
|
||||
if(correctionVO.getCorrectionType().contains("2")) {
|
||||
iSmsService.sendContentDirectlyByPhone(orderDTO.getBuyPhone(), "著作权交易订单(" + goodsonlineDTO.getGoodsName() + " " + goodsonlineDTO.getGoodsVersion() + "),需要您补充资料(" + correctionVO.getCorrectionTitle() + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
return correctionId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String saveReturnId(String token, CorrectionVO correctionVO) {
|
||||
OrderDTO orderDTO = iOrderService.get(correctionVO.getOrderId());
|
||||
@ -287,4 +364,5 @@ public class CorrectionServiceImpl extends DefaultBaseService implements ICorrec
|
||||
return count == null ? 0 : count;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -185,4 +185,5 @@ public interface IGoodslogService {
|
||||
*/
|
||||
Integer count(Map<String, Object> params);
|
||||
|
||||
String saveByUser(GoodslogVO goodsLogVO, String userId);
|
||||
}
|
@ -4,6 +4,7 @@ import ink.wgink.common.base.DefaultBaseService;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.result.SuccessResult;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import ink.wgink.util.date.DateUtil;
|
||||
import ink.wgink.util.map.HashMapUtil;
|
||||
import ink.wgink.util.UUIDUtil;
|
||||
import cn.com.tenlion.aishop.dao.goodslog.IGoodslogDao;
|
||||
@ -168,4 +169,18 @@ public class GoodslogServiceImpl extends DefaultBaseService implements IGoodslog
|
||||
return count == null ? 0 : count;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String saveByUser(GoodslogVO goodsLogVO, String userId) {
|
||||
String goodslogId = UUIDUtil.getUUID();
|
||||
Map<String, Object> params = HashMapUtil.beanToMap(goodsLogVO);
|
||||
params.put("goodslogId", goodslogId);
|
||||
params.put("creator", userId);
|
||||
params.put("gmtCreate", DateUtil.getTime());
|
||||
params.put("modifier", userId);
|
||||
params.put("gmtModified", DateUtil.getTime());
|
||||
params.put("isDelete", 0);
|
||||
goodslogDao.save(params);
|
||||
return goodslogId;
|
||||
}
|
||||
|
||||
}
|
@ -207,4 +207,9 @@ public interface IOrderService {
|
||||
void saveEvaluate(String orderId, OrderEvaluateVO orderBuyVO);
|
||||
|
||||
OrderBaseDTO getOrder(String orderId);
|
||||
OrderBaseDTO getOrderResource(String orderId);
|
||||
|
||||
void saveByUser(String orderId, String producePhoto, String userId);
|
||||
|
||||
void updateClose();
|
||||
}
|
@ -499,4 +499,85 @@ public class OrderServiceImpl extends DefaultBaseService implements IOrderServic
|
||||
return baseDTO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OrderBaseDTO getOrderResource(String orderId) {
|
||||
OrderDTO orderDTO = get(orderId);
|
||||
OrderBaseDTO baseDTO = new OrderBaseDTO();
|
||||
BeanUtils.copyProperties(orderDTO, baseDTO);
|
||||
// 管理员角色才可以看买家卖家信息
|
||||
// 查询卖家买家信息
|
||||
GoodsSimplePersonDTO buy = new GoodsSimplePersonDTO();
|
||||
buy.setCity(orderDTO.getBuyCity());
|
||||
buy.setName(orderDTO.getBuyName());
|
||||
buy.setType(orderDTO.getBuyType().equals("1") ? "自然人" : orderDTO.getBuyType().equals("2") ? "法人" : "非法人组织或其他");
|
||||
buy.setPhone(orderDTO.getBuyPhone());
|
||||
buy.setIdcardType(orderDTO.getBuyIdcardType());
|
||||
buy.setIdcard(orderDTO.getBuyIdcard());
|
||||
baseDTO.setBuyUserDTO(buy);
|
||||
|
||||
GoodsSimplePersonDTO sell = new GoodsSimplePersonDTO();
|
||||
GoodsonlineDTO goodsonlineDTO = iGoodsonlineService.getByGoodsIdAndNumber(orderDTO.getGoodsId(), orderDTO.getGoodsVnumber());
|
||||
sell.setName(goodsonlineDTO.getGoodsLeader());
|
||||
sell.setType(goodsonlineDTO.getGoodsLeaderType());
|
||||
sell.setPhone(goodsonlineDTO.getGoodsLeaderPhone());
|
||||
sell.setCity(goodsonlineDTO.getGoodsLeaderCity1());
|
||||
sell.setIdcardType(goodsonlineDTO.getGoodsLeaderIdcardType());
|
||||
sell.setIdcard(goodsonlineDTO.getGoodsLeaderIdcard());
|
||||
baseDTO.setSellUserDTO(sell);
|
||||
baseDTO.setBuyUserId(orderDTO.getBuyUserId());
|
||||
baseDTO.setSellUserId(orderDTO.getSellUserId());
|
||||
baseDTO.setStatus(Integer.valueOf(orderDTO.getOrderStatus()));
|
||||
if (orderDTO.getOrderStatus().equals("0")) {
|
||||
baseDTO.setOrderStatus("订单已取消");
|
||||
}else if (orderDTO.getOrderStatus().equals("1")) {
|
||||
baseDTO.setOrderStatus("买家待付款");
|
||||
}else if (orderDTO.getOrderStatus().equals("2")) {
|
||||
baseDTO.setOrderStatus("待填写资料");
|
||||
}else if (orderDTO.getOrderStatus().equals("3")) {
|
||||
baseDTO.setOrderStatus("过户进行中");
|
||||
}else if (orderDTO.getOrderStatus().equals("4")) {
|
||||
baseDTO.setOrderStatus("过户已完成");
|
||||
}else if (orderDTO.getOrderStatus().equals("5")) {
|
||||
baseDTO.setOrderStatus("买家已评价");
|
||||
}else if (orderDTO.getOrderStatus().equals("6")) {
|
||||
baseDTO.setOrderStatus("发票已开具");
|
||||
}
|
||||
GoodsSimpleDTO goodsonlineDTO1 = iGoodsonlineService.getByGoodsId(orderDTO.getGoodsId(), orderDTO.getGoodsVnumber());
|
||||
baseDTO.setGoodsDTO(goodsonlineDTO1);
|
||||
return baseDTO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveByUser(String orderId, String producePhoto, String userId) {
|
||||
OrderDTO orderDTO = get(orderId);
|
||||
GoodsSimpleDTO simpleDTO = iGoodsonlineService.getByGoodsId(orderDTO.getGoodsId(), orderDTO.getGoodsVnumber());
|
||||
GoodsonlineDTO dto = iGoodsonlineService.get(simpleDTO.getGoodsOnlineId());
|
||||
if (dto.getGoodsPhoto().equals(producePhoto)) {
|
||||
throw new SaveException("请上传过户结果电子文件");
|
||||
}
|
||||
String time = DateUtil.getTime();
|
||||
Map<String, Object> params = super.getHashMap(2);
|
||||
params.put("orderId", orderId);
|
||||
params.put("orderStatus", "4");
|
||||
params.put("produceTime", time);
|
||||
params.put("producePhoto", producePhoto);
|
||||
orderDao.updateStatus(params);
|
||||
GoodslogVO goodsLogVO = new GoodslogVO();
|
||||
goodsLogVO.setGoodslogType("ORDER");
|
||||
goodsLogVO.setGoodslogTime(DateUtil.getTime());
|
||||
goodsLogVO.setGoodslogName("平台上传了该著作权商品过户后的电子文件");
|
||||
goodsLogVO.setGoodslogStatus("");
|
||||
goodsLogVO.setGoodsId(orderDTO.getGoodsId());
|
||||
goodsLogVO.setGoodslogContent("订单号:" + orderDTO.getOrderNumber());
|
||||
iGoodslogService.saveByUser(goodsLogVO, userId);
|
||||
if (systemConfig.getSmsSwitch()) {
|
||||
iSmsService.sendContentDirectlyByPhone(orderDTO.getBuyPhone(), "您购买的著作权商品(" + simpleDTO.getGoodsName() + " " + simpleDTO.getGoodsVersion() + ") 已经过户完成, 请登录平台查看。");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateClose() {
|
||||
orderDao.updateClose(new HashMap<>());
|
||||
}
|
||||
|
||||
}
|
21
src/main/java/cn/com/tenlion/aishop/util/CloseOrderTask.java
Normal file
21
src/main/java/cn/com/tenlion/aishop/util/CloseOrderTask.java
Normal file
@ -0,0 +1,21 @@
|
||||
package cn.com.tenlion.aishop.util;
|
||||
|
||||
import cn.com.tenlion.aishop.service.order.IOrderService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 定时删除超时未付款的订单
|
||||
*/
|
||||
@Component
|
||||
public class CloseOrderTask {
|
||||
|
||||
@Autowired
|
||||
private IOrderService iOrderService;
|
||||
|
||||
@Scheduled(cron = "0 */2 * * * ?")
|
||||
public void task() {
|
||||
iOrderService.updateClose();
|
||||
}
|
||||
}
|
@ -204,6 +204,17 @@
|
||||
order_id = #{orderId}
|
||||
</update>
|
||||
|
||||
<update id="updateClose" parameterType="map">
|
||||
UPDATE
|
||||
shop_order
|
||||
SET
|
||||
order_status = '0'
|
||||
WHERE
|
||||
order_status = '1'
|
||||
AND
|
||||
NOW() - INTERVAL 60 MINUTE >= create_time
|
||||
</update>
|
||||
|
||||
<!-- 修改订单 -->
|
||||
<update id="update" parameterType="map">
|
||||
UPDATE
|
||||
|
@ -44,7 +44,7 @@
|
||||
{{# for(var i = 0, item = files[i]; item = files[i++];) { }}
|
||||
<span class="layui-btn-group">
|
||||
<div class="upload-file-box">
|
||||
<a class="upload-file-a" onclick="window.open('route/file/download/true/{{item.fileId}}')" href="javascript:void(0)" title="{{item.fileName}} - 点击下载">
|
||||
<a class="upload-file-a" onclick="window.open('{{d.accountServicePath}}route/file/download/true/{{item.fileId}}')" href="javascript:void(0)" title="{{item.fileName}} - 点击下载">
|
||||
{{# if(item.fileType == 'doc' || item.fileType == 'docx') { }}
|
||||
<img src="assets/images/filetype/word.png"/>
|
||||
{{# } else if(item.fileType == 'xls' || item.fileType == 'xlsx') { }}
|
||||
@ -174,6 +174,7 @@
|
||||
var dataRander = {};
|
||||
dataRander[fileName] = file;
|
||||
dataRander["AgentServerUrl"] = "";
|
||||
dataRander["accountServicePath"] = "[[${accountServicePath}]]/";
|
||||
dataRander["showUp"] = ( showUp == false ? false : true );
|
||||
console.log(dataRander);
|
||||
laytpl(document.getElementById(fileName +'FileDownload').innerHTML).render(dataRander, function(html) {
|
||||
@ -187,6 +188,7 @@
|
||||
dataForm[fileName] = ids;
|
||||
dataForm["showUp"] = showUp;
|
||||
dataForm["AgentServerUrl"] = "";
|
||||
dataForm["accountServicePath"] = "[[${accountServicePath}]]/";
|
||||
form.val('dataForm', dataForm);
|
||||
|
||||
if(!ids) {
|
||||
@ -197,7 +199,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
top.restAjax.get(top.restAjax.path( (fileName == 'correctionFiles' ? '' : "") + 'api/file/list', []), {
|
||||
top.restAjax.get(top.restAjax.path( (fileName == 'correctionFiles' ? '[[${accountServicePath}]]/' : "") + 'api/file/list', []), {
|
||||
ids: ids
|
||||
}, null, function(code, data) {
|
||||
refreshDownloadTemplet(fileName, data, showUp);
|
||||
|
@ -44,7 +44,7 @@
|
||||
{{# for(var i = 0, item = files[i]; item = files[i++];) { }}
|
||||
<span class="layui-btn-group">
|
||||
<div class="upload-file-box">
|
||||
<a class="upload-file-a" onclick="window.open('route/file/download/true/{{item.fileId}}')" href="javascript:void(0)" title="{{item.fileName}} - 点击下载">
|
||||
<a class="upload-file-a" onclick="window.open('{{d.accountServicePath}}route/file/download/true/{{item.fileId}}')" href="javascript:void(0)" title="{{item.fileName}} - 点击下载">
|
||||
{{# if(item.fileType == 'doc' || item.fileType == 'docx') { }}
|
||||
<img src="assets/images/filetype/word.png"/>
|
||||
{{# } else if(item.fileType == 'xls' || item.fileType == 'xlsx') { }}
|
||||
@ -174,6 +174,7 @@
|
||||
var dataRander = {};
|
||||
dataRander[fileName] = file;
|
||||
dataRander["AgentServerUrl"] = "";
|
||||
dataRander["accountServicePath"] = "[[${accountServicePath}]]/";
|
||||
dataRander["showUp"] = ( showUp == false ? false : true );
|
||||
console.log(dataRander);
|
||||
laytpl(document.getElementById(fileName +'FileDownload').innerHTML).render(dataRander, function(html) {
|
||||
@ -187,6 +188,7 @@
|
||||
dataForm[fileName] = ids;
|
||||
dataForm["showUp"] = showUp;
|
||||
dataForm["AgentServerUrl"] = "";
|
||||
dataForm["accountServicePath"] = "[[${accountServicePath}]]/";
|
||||
form.val('dataForm', dataForm);
|
||||
|
||||
if(!ids) {
|
||||
@ -197,7 +199,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
top.restAjax.get(top.restAjax.path( (fileName == 'correctionFiles' ? '' : "") + 'api/file/list', []), {
|
||||
top.restAjax.get(top.restAjax.path( (fileName == 'correctionFiles' ? '[[${accountServicePath}]]/' : "") + 'api/file/list', []), {
|
||||
ids: ids
|
||||
}, null, function(code, data) {
|
||||
refreshDownloadTemplet(fileName, data, showUp);
|
||||
|
@ -288,7 +288,7 @@
|
||||
}
|
||||
});
|
||||
}else if(layEvent === 'downEvent') {
|
||||
window.open("route/file/download/false/" + data.producePhoto);
|
||||
window.open("[[${accountServicePath}]]/route/file/download/true/" + data.producePhoto);
|
||||
}else if(layEvent === 'viewEvent') {
|
||||
top.layer.open({
|
||||
type: 2,
|
||||
|
@ -373,7 +373,7 @@
|
||||
|
||||
var producePhoto = "";
|
||||
$('#downLoad').click(function() {
|
||||
window.open("route/file/download/false/" + producePhoto);
|
||||
window.open("[[${accountServicePath}]]/route/file/download/true/" + producePhoto);
|
||||
});
|
||||
|
||||
function evaluateLevel(value) {
|
||||
@ -456,6 +456,7 @@
|
||||
function initData() {
|
||||
var loadLayerIndex;
|
||||
top.restAjax.get(top.restAjax.path('api/order/get/{orderId}', [orderId]), {}, null, function(code, data) {
|
||||
alert(123)
|
||||
var dataFormData = {};
|
||||
for(var i in data) {
|
||||
dataFormData[i] = data[i] +'';
|
||||
@ -478,9 +479,9 @@
|
||||
});
|
||||
if (data.producePhoto) {
|
||||
producePhoto = data.producePhoto;
|
||||
$("#producePhotoImage").attr("src", "route/file/download/false/" + data.producePhoto);
|
||||
$("#producePhotoImage").attr("src", "[[${accountServicePath}]]/route/file/download/false/" + data.producePhoto);
|
||||
new Viewer(document.getElementById("producePhotoSpanDIV"), {
|
||||
url: "route/file/download/false/" + data.producePhoto,
|
||||
url: "[[${accountServicePath}]]/route/file/download/false/" + data.producePhoto,
|
||||
fullscreen: false, // 不需要全屏
|
||||
title: false, //不需要文件标题
|
||||
});
|
||||
|
@ -466,9 +466,9 @@
|
||||
title: false, //不需要文件标题
|
||||
});
|
||||
if(data.producePhoto) {
|
||||
$("#producePhotoImage").attr("src", "route/file/download/false/" + data.producePhoto);
|
||||
$("#producePhotoImage").attr("src", "[[${accountServicePath}]]/route/file/download/false/" + data.producePhoto);
|
||||
new Viewer(document.getElementById("producePhotoSpanDIV"), {
|
||||
url: "route/file/download/false/" + data.producePhoto,
|
||||
url: "[[${accountServicePath}]]/route/file/download/false/" + data.producePhoto,
|
||||
fullscreen: false, // 不需要全屏
|
||||
title: false, //不需要文件标题
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user