作者 yangfu

Merge branch 'dev' of http://gitlab.fjmaimaimai.com/allied-creation/allied-creat…

…ion-cooperation into dev
1 <component name="ProjectRunConfigurationManager"> 1 <component name="ProjectRunConfigurationManager">
2 - <configuration default="false" name="Docker for Mac" type="docker-deploy" factoryName="dockerfile" server-name="Docker for Mac"> 2 + <configuration default="false" name="Docker for Mac" type="docker-deploy" factoryName="dockerfile" server-name="Docker">
3 <deployment type="dockerfile"> 3 <deployment type="dockerfile">
4 <settings> 4 <settings>
5 - <option name="imageTag" value="" /> 5 + <option name="imageTag" value="latest" />
6 <option name="containerName" value="allied-creation-cooperation" /> 6 <option name="containerName" value="allied-creation-cooperation" />
  7 + <option name="envVars">
  8 + <list>
  9 + <DockerEnvVarImpl>
  10 + <option name="name" value="POSTGRESQL_HOST" />
  11 + <option name="value" value="114.55.200.59" />
  12 + </DockerEnvVarImpl>
  13 + <DockerEnvVarImpl>
  14 + <option name="name" value="POSTGRESQL_DB_NAME" />
  15 + <option name="value" value="allied_creation_cooperation_dev" />
  16 + </DockerEnvVarImpl>
  17 + <DockerEnvVarImpl>
  18 + <option name="name" value="POSTGRESQL_PORT" />
  19 + <option name="value" value="31543" />
  20 + </DockerEnvVarImpl>
  21 + <DockerEnvVarImpl>
  22 + <option name="name" value="POSTGRESQL_PASSWORD" />
  23 + <option name="value" value="eagle1010" />
  24 + </DockerEnvVarImpl>
  25 + </list>
  26 + </option>
  27 + <option name="portBindings">
  28 + <list>
  29 + <DockerPortBindingImpl>
  30 + <option name="containerPort" value="8082" />
  31 + <option name="hostPort" value="8082" />
  32 + </DockerPortBindingImpl>
  33 + </list>
  34 + </option>
7 <option name="sourceFilePath" value="Dockerfile" /> 35 <option name="sourceFilePath" value="Dockerfile" />
8 </settings> 36 </settings>
9 </deployment> 37 </deployment>
@@ -14,4 +14,22 @@ ENV GOPROXY https://goproxy.io @@ -14,4 +14,22 @@ ENV GOPROXY https://goproxy.io
14 RUN ["go","mod","tidy"] 14 RUN ["go","mod","tidy"]
15 RUN ["ls"] 15 RUN ["ls"]
16 RUN ["go","build"] 16 RUN ["go","build"]
17 -ENTRYPOINT ["./allied-creation-cooperation"]  
  17 +ENTRYPOINT ["./allied-creation-cooperation"]
  18 +
  19 +##############################
  20 +### STEP 1 build executable binary
  21 +##############################
  22 +#FROM golang:latest AS builder
  23 +#MAINTAINER 陈志颖 <steve.d.chan@qq.com>
  24 +#RUN mkdir /app
  25 +#WORKDIR /app
  26 +#COPY . /app
  27 +#RUN ["ln","-sf","/usr/share/zoneinfo/Asia/Shanghai","/etc/localtime"]
  28 +#RUN GO111MODULE="on" GOPROXY="https://goproxy.cn" CGO_ENABLED=0 GOOS=linux go build -o allied-creation-cooperation
  29 +#
  30 +##############################
  31 +### STEP 2 build a small image
  32 +#############################
  33 +#FROM scratch as final
  34 +#COPY --from=builder /app/allied-creation-cooperation /app/allied-creation-cooperation
  35 +#ENTRYPOINT ["./app/allied-creation-cooperation"]
@@ -898,7 +898,7 @@ func (dividendsEstimateService *DividendsEstimateService) ConfirmDividendsIncent @@ -898,7 +898,7 @@ func (dividendsEstimateService *DividendsEstimateService) ConfirmDividendsIncent
898 } 898 }
899 899
900 return map[string]interface{}{ 900 return map[string]interface{}{
901 - "report": fmt.Sprintf("已完成%d笔单订单分红预算,生成%d笔单分红预算,%d笔订单分红预算失败,失败原因:%s", len(estimateSuccessfullyDividendsOrders), successfullyCount, len(estimateFailedDividendsOrders), failedReasonStr), 901 + "report": fmt.Sprintf("已完成%d单订单分红预算,生成%d单分红预算,%d笔订单分红预算失败,失败原因:%s", len(estimateSuccessfullyDividendsOrders), successfullyCount, len(estimateFailedDividendsOrders), failedReasonStr),
902 }, nil 902 }, nil
903 } 903 }
904 } 904 }