fix
Helius
2021-09-15 7ab7943de217a9e5d4a489c22c7ae27a29692d55
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package com.xzx.gc.system.controller;
 
 
import com.xzx.gc.common.Result;
import com.xzx.gc.common.annotations.PassToken;
import com.xzx.gc.common.constant.Constants;
import com.xzx.gc.common.dto.log.OperationAppLog;
import com.xzx.gc.common.request.BaseController;
import com.xzx.gc.model.IdDTO;
import com.xzx.gc.model.system.ItemPriceAddDTO;
import com.xzx.gc.system.service.OtherUserService;
import com.xzx.gc.system.service.SysItemPriceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
 
import javax.servlet.http.HttpServletRequest;
 
@Api(tags = "骑手分类价格管理")
@RestController
@Slf4j
public class SysItemPriceController extends BaseController {
 
 
    @Autowired
    private SysItemPriceService sysItemPriceService;
 
    @Autowired
    private OtherUserService otherUserService;
 
 
    @ApiOperation(value = "添加骑手分类价格")
    @PostMapping("/itemPrice/add")
    public Result itemUserAdd(HttpServletRequest request, @RequestBody ItemPriceAddDTO itemPriceAddDTO) {
        sysItemPriceService.itemPriceAdd(itemPriceAddDTO);
        String mobilePhone = otherUserService.findById(getUserId(request)).getMobilePhone();
        OperationAppLog build = OperationAppLog.builder().appPrograme(getFrontClient(request)).opreateName(mobilePhone)
                .methodName(Constants.SYS_MODUL_NAME).operateAction("添加骑手分类价格-"+itemPriceAddDTO.getItemId()).build();
        mqUtil.sendApp(build);
        return Result.success();
    }
 
 
}